You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

140 line
3.1KB

  1. # You may add here your
  2. # server {
  3. # ...
  4. # }
  5. # statements for each of your virtual hosts to this file
  6. ##
  7. # You should look at the following URL's in order to grasp a solid understanding
  8. # of Nginx configuration files in order to fully unleash the power of Nginx.
  9. # http://wiki.nginx.org/Pitfalls
  10. # http://wiki.nginx.org/QuickStart
  11. # http://wiki.nginx.org/Configuration
  12. #
  13. # Generally, you will want to move this file somewhere, and start with a clean
  14. # file but keep this around for reference. Or just disable in sites-enabled.
  15. #
  16. # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
  17. ##
  18. server {
  19. #listen 80; ## listen for ipv4; this line is default and implied
  20. #listen [::]:80 default_server ipv6only=on; ## listen for ipv6
  21. root /usr/share/nginx/www;
  22. index index.html index.htm index.php;
  23. # Make site accessible from http://localhost/
  24. server_name localhost;
  25. location / {
  26. # First attempt to serve request as file, then
  27. # as directory, then fall back to displaying a 404.
  28. try_files $uri $uri/ /index.html;
  29. # Uncomment to enable naxsi on this location
  30. # include /etc/nginx/naxsi.rules
  31. }
  32. location /doc/ {
  33. alias /usr/share/doc/;
  34. autoindex on;
  35. allow 127.0.0.1;
  36. allow ::1;
  37. deny all;
  38. }
  39. # Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests
  40. #location /RequestDenied {
  41. # proxy_pass http://127.0.0.1:8080;
  42. #}
  43. #error_page 404 /404.html;
  44. # redirect server error pages to the static page /50x.html
  45. #
  46. #error_page 500 502 503 504 /50x.html;
  47. #location = /50x.html {
  48. # root /usr/share/nginx/www;
  49. #}
  50. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  51. #
  52. #location ~ \.php$ {
  53. # fastcgi_split_path_info ^(.+\.php)(/.+)$;
  54. # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
  55. #
  56. # # With php7.0-cgi alone:
  57. # fastcgi_pass 127.0.0.1:9000;
  58. # # With php7.0-fpm:
  59. # fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
  60. # fastcgi_index index.php;
  61. # include fastcgi_params;
  62. #}
  63. # deny access to .htaccess files, if Apache's document root
  64. # concurs with nginx's one
  65. #
  66. #location ~ /\.ht {
  67. # deny all;
  68. #}
  69. # pass the PHP scripts to PHP-FPM server listening on unix socket
  70. location ~ \.php$ {
  71. try_files $uri =404;
  72. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  73. fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
  74. fastcgi_index index.php;
  75. include fastcgi_params;
  76. }
  77. # deny access to .htaccess files
  78. location ~ /\.ht {
  79. deny all;
  80. }
  81. }
  82. # another virtual host using mix of IP-, name-, and port-based configuration
  83. #
  84. #server {
  85. # listen 8000;
  86. # listen somename:8080;
  87. # server_name somename alias another.alias;
  88. # root html;
  89. # index index.html index.htm;
  90. #
  91. # location / {
  92. # try_files $uri $uri/ =404;
  93. # }
  94. #}
  95. # HTTPS server
  96. #
  97. #server {
  98. # listen 443;
  99. # server_name localhost;
  100. #
  101. # root html;
  102. # index index.html index.htm;
  103. #
  104. # ssl on;
  105. # ssl_certificate cert.pem;
  106. # ssl_certificate_key cert.key;
  107. #
  108. # ssl_session_timeout 5m;
  109. #
  110. # ssl_protocols SSLv3 TLSv1;
  111. # ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
  112. # ssl_prefer_server_ciphers on;
  113. #
  114. # location / {
  115. # try_files $uri $uri/ =404;
  116. # }
  117. #}