Guest User

Untitled

a guest
Apr 26th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1. server {
  2. listen 80;
  3. server_name <my server ip>;
  4. root /var/www/html;
  5. index index.php index.html index.htm;
  6.  
  7. location / {
  8. try_files $uri $uri/ =404;
  9. }
  10. error_page 404 /404.html;
  11. error_page 500 502 503 504 /50x.html;
  12. location = /50x.html {
  13. root /var/www/html;
  14. }
  15.  
  16. location ~ .php$ {
  17. try_files $uri =404;
  18. fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
  19. fastcgi_index index.php;
  20. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  21. include fastcgi_params;
  22. }
  23.  
  24. }
  25.  
  26. server {
  27. listen 80;
  28. server_name nativeleaf.co.uk www.nativeleaf.co.uk;
  29. access_log /var/www/html/nativeleaf.co.uk/access.log combined;
  30. root /var/www/html/nativeleaf.co.uk;
  31. }
  32.  
  33. ; Start a new pool named 'www'.
  34. [www]
  35.  
  36. ; The address on which to accept FastCGI requests.
  37. ; Valid syntaxes are:
  38. ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
  39. ; a specific port;
  40. ; 'port' - to listen on a TCP socket to all addresses on a
  41. ; specific port;
  42. ; '/path/to/unix/socket' - to listen on a unix socket.
  43. ; Note: This value is mandatory.
  44. ;listen = 127.0.0.1:9000
  45. listen = /var/run/php-fpm/php-fpm.sock
  46.  
  47. ; Set listen(2) backlog. A value of '-1' means unlimited.
  48. ; Default Value: -1
  49. ;listen.backlog = -1
  50.  
  51. ; List of ipv4 addresses of FastCGI clients which are allowed to connect.
  52. ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
  53. ; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
  54. ; must be separated by a comma. If this value is left blank, connections will be
  55. ; accepted from any ip address.
  56. ; Default Value: any
  57. listen.allowed_clients = 127.0.0.1
  58.  
  59. ; Set permissions for unix socket, if one is used. In Linux, read/write
  60. ; permissions must be set in order to allow connections from a web server. Many
  61. ; BSD-derived systems allow connections regardless of permissions.
  62. ; Default Values: user and group are set as the running user
  63. ; mode is set to 0666
  64. listen.owner = nginx
  65. listen.group = nginx
  66. listen.mode = 0750
  67.  
  68. ; Unix user/group of processes
  69. ; Note: The user is mandatory. If the group is not set, the default user's group
  70. ; will be used.
  71. ; RPM: apache Choosed to be able to access some dir as httpd
  72. user = nginx
  73. ; RPM: Keep a group allowed to write in log dir.
  74. group = nginx
Add Comment
Please, Sign In to add comment