Advertisement
Guest User

Untitled

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