example.conf 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. server {
  2. listen 80;
  3. server_name localhost;
  4. location / {
  5. root /www/;
  6. index index.html index.htm;
  7. }
  8. access_log /var/log/nginx/access.log;
  9. error_log /var/log/nginx/error.log;
  10. #error_page 404 /404.html;
  11. # redirect server error pages to the static page /50x.html
  12. #
  13. error_page 500 502 503 504 /50x.html;
  14. location = /50x.html {
  15. root /usr/share/nginx/html;
  16. }
  17. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  18. #
  19. #location ~ \.php$ {
  20. # proxy_pass http://127.0.0.1;
  21. #}
  22. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  23. #
  24. #location ~ \.php$ {
  25. # root html;
  26. # fastcgi_pass 127.0.0.1:9000;
  27. # fastcgi_index index.php;
  28. # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  29. # include fastcgi_params;
  30. #}
  31. # deny access to .htaccess files, if Apache's document root
  32. # concurs with nginx's one
  33. #
  34. #location ~ /\.ht {
  35. # deny all;
  36. #}
  37. }
  38. # another virtual host using mix of IP-, name-, and port-based configuration
  39. #
  40. #server {
  41. # listen 8000;
  42. # listen somename:8080;
  43. # server_name somename alias another.alias;
  44. # location / {
  45. # root html;
  46. # index index.html index.htm;
  47. # }
  48. #}
  49. # HTTPS server
  50. #
  51. #server {
  52. # listen 443 ssl;
  53. # server_name localhost;
  54. # ssl_certificate cert.pem;
  55. # ssl_certificate_key cert.key;
  56. # ssl_session_cache shared:SSL:1m;
  57. # ssl_session_timeout 5m;
  58. # ssl_ciphers HIGH:!aNULL:!MD5;
  59. # ssl_prefer_server_ciphers on;
  60. # location / {
  61. # root html;
  62. # index index.html index.htm;
  63. # }
  64. #}