nginx-default 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. ##
  2. # You should look at the following URL's in order to grasp a solid understanding
  3. # of Nginx configuration files in order to fully unleash the power of Nginx.
  4. # http://wiki.nginx.org/Pitfalls
  5. # http://wiki.nginx.org/QuickStart
  6. # http://wiki.nginx.org/Configuration
  7. #
  8. # Generally, you will want to move this file somewhere, and start with a clean
  9. # file but keep this around for reference. Or just disable in sites-enabled.
  10. #
  11. # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
  12. ##
  13. # Default server configuration
  14. #
  15. server {
  16. listen 80 default_server;
  17. listen [::]:80 default_server;
  18. # SSL configuration
  19. #
  20. # listen 443 ssl default_server;
  21. # listen [::]:443 ssl default_server;
  22. #
  23. # Self signed certs generated by the ssl-cert package
  24. # Don't use them in a production server!
  25. #
  26. # include snippets/snakeoil.conf;
  27. root /builds/;
  28. # Add index.php to the list if you are using PHP
  29. index index.php index.html index.htm index.nginx-debian.html;
  30. server_name _;
  31. location / {
  32. # First attempt to serve request as file, then
  33. # as directory, then fall back to displaying a 404.
  34. try_files $uri $uri/ =404;
  35. autoindex on;
  36. }
  37. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  38. #
  39. location ~ \.php$ {
  40. include snippets/fastcgi-php.conf;
  41. # With php5-cgi alone:
  42. #fastcgi_pass 127.0.0.1:9000;
  43. # With php5-fpm:
  44. fastcgi_pass unix:/var/run/php5-fpm.sock;
  45. }
  46. # deny access to .htaccess files, if Apache's document root
  47. # concurs with nginx's one
  48. #
  49. #location ~ /\.ht {
  50. # deny all;
  51. #}
  52. }
  53. # Virtual Host configuration for example.com
  54. #
  55. # You can move that to a different file under sites-available/ and symlink that
  56. # to sites-enabled/ to enable it.
  57. #
  58. #server {
  59. # listen 80;
  60. # listen [::]:80;
  61. #
  62. # server_name example.com;
  63. #
  64. # root /var/www/example.com;
  65. # index index.html;
  66. #
  67. # location / {
  68. # try_files $uri $uri/ =404;
  69. # }
  70. #}