Advertisement
Guest User

Default

a guest
May 31st, 2013
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. server {
  2. listen 8080; ## listen for ipv4; this line is default and implied
  3. #listen [::]:80 default_server ipv6only=on; ## listen for ipv6
  4.  
  5. root /usr/share/nginx/www;
  6. index index.php index.html index.htm;
  7.  
  8. # Make site accessible from http://localhost/
  9. # server_name localhost;
  10.  
  11. location / {
  12. # First attempt to serve request as file, then
  13. # as directory, then fall back to displaying a 404.
  14. try_files $uri $uri/ /index.html;
  15. # Uncomment to enable naxsi on this location
  16. # include /etc/nginx/naxsi.rules
  17. }
  18.  
  19. location /doc/ {
  20. alias /usr/share/doc/;
  21. autoindex on;
  22. allow 127.0.0.1;
  23. allow ::1;
  24. deny all;
  25. }
  26.  
  27. # Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests
  28. #location /RequestDenied {
  29. # proxy_pass http://127.0.0.1:8080;
  30. #}
  31.  
  32. #error_page 404 /404.html;
  33.  
  34. # redirect server error pages to the static page /50x.html
  35. #
  36. #error_page 500 502 503 504 /50x.html;
  37. #location = /50x.html {
  38. # root /usr/share/nginx/www;
  39. #}
  40.  
  41. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  42. #
  43. location ~ \.php$ {
  44. # fastcgi_split_path_info ^(.+\.php)(/.+)$;
  45. # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
  46. #
  47. # # With php5-cgi alone:
  48. # fastcgi_pass 127.0.0.1:9000;
  49. # # With php5-fpm:
  50. fastcgi_pass unix:/var/run/php5-fpm.sock;
  51. fastcgi_index index.php;
  52. include fastcgi_params;
  53. }
  54.  
  55. # deny access to .htaccess files, if Apache's document root
  56. # concurs with nginx's one
  57. #
  58. #location ~ /\.ht {
  59. # deny all;
  60. #}
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement