Advertisement
Guest User

Untitled

a guest
May 11th, 2012
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.56 KB | None | 0 0
  1. # You may add here your
  2. # server {
  3. # ...
  4. # }
  5. # statements for each of your virtual hosts to this file
  6.  
  7. ##
  8. # You should look at the following URL's in order to grasp a solid understanding
  9. # of Nginx configuration files in order to fully unleash the power of Nginx.
  10. # http://wiki.nginx.org/Pitfalls
  11. # http://wiki.nginx.org/QuickStart
  12. # http://wiki.nginx.org/Configuration
  13. #
  14. # Generally, you will want to move this file somewhere, and start with a clean
  15. # file but keep this around for reference. Or just disable in sites-enabled.
  16. #
  17. # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
  18. ##
  19.  
  20. server {
  21. #listen 80; ## listen for ipv4; this line is default and implied
  22. #listen [::]:80 default_server ipv6only=on; ## listen for ipv6
  23.  
  24. root /usr/share/nginx/www;
  25. index index.html index.htm index.php;
  26.  
  27. # Make site accessible from http://localhost/
  28. server_name localhost;
  29.  
  30. location / {
  31. # First attempt to serve request as file, then
  32. # as directory, then fall back to index.html
  33. try_files $uri $uri/ /index.html;
  34. # Uncomment to enable naxsi on this location
  35. # include /etc/nginx/naxsi.rules
  36. }
  37.  
  38. location /doc/ {
  39. alias /usr/share/doc/;
  40. autoindex on;
  41. allow 127.0.0.1;
  42. deny all;
  43. }
  44.  
  45. # Only for nginx-naxsi : process denied requests
  46. #location /RequestDenied {
  47. # For example, return an error code
  48. #return 418;
  49. #}
  50.  
  51. #error_page 404 /404.html;
  52.  
  53. # redirect server error pages to the static page /50x.html
  54. #
  55. #error_page 500 502 503 504 /50x.html;
  56. #location = /50x.html {
  57.  
  58.  
  59. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  60. #
  61. location ~ \.php$ {
  62. # fastcgi_split_path_info ^(.+\.php)(/.+)$;
  63. # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
  64. #
  65. # # With php5-cgi alone:
  66. # fastcgi_pass 127.0.0.1:9000;
  67. # # With php5-fpm:
  68. fastcgi_pass unix:/var/run/php5-fpm.sock;
  69. fastcgi_index index.php;
  70. include fastcgi_params;
  71. fastcgi_pass php-fpm;
  72. #}
  73.  
  74. # deny access to .htaccess files, if Apache's document root
  75. # concurs with nginx's one
  76. #
  77. #location ~ /\.ht {
  78. # deny all;
  79. #}
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement