nginx.conf 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. #user nobody;
  2. worker_processes 1;
  3. #error_log logs/error.log;
  4. #error_log logs/error.log notice;
  5. #error_log logs/error.log info;
  6. #pid logs/nginx.pid;
  7. events {
  8. worker_connections 1024;
  9. }
  10. http {
  11. include mime.types;
  12. default_type application/octet-stream;
  13. #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  14. # '$status $body_bytes_sent "$http_referer" '
  15. # '"$http_user_agent" "$http_x_forwarded_for"';
  16. #access_log logs/access.log main;
  17. sendfile on;
  18. #tcp_nopush on;
  19. #keepalive_timeout 0;
  20. keepalive_timeout 65;
  21. #gzip on;
  22. server {
  23. listen 80;
  24. server_name localhost;
  25. charset utf-8;
  26. #charset koi8-r;
  27. #access_log logs/host.access.log main;
  28. location / {
  29. root html;
  30. try_files $uri $uri/ /index.html;
  31. index index.html index.htm;
  32. }
  33. #error_page 404 /404.html;
  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 html;
  39. }
  40. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  41. #
  42. #location ~ \.php$ {
  43. # proxy_pass http://127.0.0.1;
  44. #}
  45. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  46. #
  47. #location ~ \.php$ {
  48. # root html;
  49. # fastcgi_pass 127.0.0.1:9000;
  50. # fastcgi_index index.php;
  51. # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  52. # include fastcgi_params;
  53. #}
  54. # deny access to .htaccess files, if Apache's document root
  55. # concurs with nginx's one
  56. #
  57. #location ~ /\.ht {
  58. # deny all;
  59. #}
  60. }
  61. # another virtual host using mix of IP-, name-, and port-based configuration
  62. #
  63. #server {
  64. # listen 8000;
  65. # listen somename:8080;
  66. # server_name somename alias another.alias;
  67. # location / {
  68. # root html;
  69. # index index.html index.htm;
  70. # }
  71. #}
  72. # HTTPS server
  73. #
  74. #server {
  75. # listen 443 ssl;
  76. # server_name localhost;
  77. # ssl_certificate cert.pem;
  78. # ssl_certificate_key cert.key;
  79. # ssl_session_cache shared:SSL:1m;
  80. # ssl_session_timeout 5m;
  81. # ssl_ciphers HIGH:!aNULL:!MD5;
  82. # ssl_prefer_server_ciphers on;
  83. # location / {
  84. # root html;
  85. # index index.html index.htm;
  86. # }
  87. #}
  88. }