Advertisement
Guest User

mynginx

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