Guest User

Untitled

a guest
Jan 30th, 2015
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. server {
  2.     listen   80;
  3.    # server_name  localhost;
  4.     server_name 127.0.0.1;
  5.  
  6.     #charset koi8-r;
  7.     #access_log  /var/log/nginx/log/host.access.log  main;
  8.  
  9.     root   /usr/share/nginx/html;
  10.     index index.php index.html index.htm;
  11.  
  12.     location / {
  13.        # root   /usr/share/nginx/html;
  14.        # index  index.html index.htm index.php;
  15.         try_files $uri $uri/ = 404;
  16.     }
  17.  
  18.      location ~ \.php$ {
  19.         try_files $uri =404;
  20.         fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
  21.         fastcgi_index index.php;
  22.         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  23.         include fastcgi_params;
  24.     }
  25.  
  26.     #error_page  404              /404.html;
  27.     # redirect server error pages to the static page /50x.html
  28.     #
  29.     error_page   500 502 503 504  /50x.html;
  30.     location = /50x.html {
  31.         root   /usr/share/nginx/html;
  32.     }
  33.  
  34.     # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  35.     #
  36.     #location ~ \.php$ {
  37.     #    proxy_pass   http://127.0.0.1;
  38.     #}
  39.  
  40.     # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  41.     #
  42.     #location ~ \.php$ {
  43.     #    root           html;
  44.     #    fastcgi_pass   127.0.0.1:9000;
  45.     #    fastcgi_index  index.php;
  46.     #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
  47.     #    include        fastcgi_params;
  48.     #}
  49.     # deny access to .htaccess files, if Apache's document root
  50.     # concurs with nginx's one
  51.     #
  52.     #location ~ /\.ht {
  53.     #    deny  all;
  54.     #}
  55. }
Advertisement
Add Comment
Please, Sign In to add comment