Guest User

DolmatNginx

a guest
Jul 24th, 2013
197
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. server {
  2.         listen 80;
  3.         server_name localhost;
  4.         root /usr/share/nginx/html;
  5.         index index.html index.htm;
  6.  
  7.  
  8.         location / {
  9.                 # First attempt to serve request as file, then
  10.                 # as directory, then fall back to displaying a 404.
  11.                 try_files $uri $uri/ /index.html;
  12.                 # Uncomment to enable naxsi on this location
  13.                 # include /etc/nginx/naxsi.rules
  14.         }
  15.  
  16.         location /doc/ {
  17.                 alias /usr/share/doc/;
  18.                 autoindex on;
  19.                 allow 127.0.0.1;
  20.                 allow ::1;
  21.                 deny all;
  22.         }
  23.  
  24.         error_page 404 /404.html;
  25.  
  26.         location = /50x.html {
  27.         root /usr/share/nginx/html;
  28.         }
  29.  
  30.         location ~ \.php$ {
  31.                 fastcgi_split_path_info ^(.+\.php)(/.+)$;
  32.          #       # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
  33.          #
  34.          #       # With php5-cgi alone:
  35.                  # fastcgi_pass 127.0.0.1:9000;
  36.  
  37.          #       # With php5-fpm:
  38.                  fastcgi_pass unix:/var/run/php5-fpm.sock;
  39.                  fastcgi_index index.php;
  40.                  fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  41.                  include fastcgi_params;
  42.          }
  43.  
  44. }
RAW Paste Data