Advertisement
Guest User

Nginx Config

a guest
Jul 2nd, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 0.62 KB | None | 0 0
  1. server {
  2.     listen       80;
  3.     server_name  server_domain_name_or_IP;
  4.  
  5.     root   /usr/share/nginx/html;
  6.     index index.php index.html index.htm;
  7.  
  8.     location / {
  9.         try_files $uri $uri/ =404;
  10.     }
  11.     error_page 404 /404.html;
  12.     error_page 500 502 503 504 /50x.html;
  13.     location = /50x.html {
  14.         root /usr/share/nginx/html;
  15.     }
  16.  
  17.     location ~ \.php$ {
  18.         try_files $uri =404;
  19.         fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
  20.         fastcgi_index index.php;
  21.         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  22.         include fastcgi_params;
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement