nginx.conf 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. # Take note of http://wiki.nginx.org/Pitfalls
  2. user www;
  3. worker_processes 1;
  4. #load_module "modules/ngx_stream_module.so";
  5. #error_log logs/error.log;
  6. #error_log logs/error.log notice;
  7. #error_log logs/error.log info;
  8. #error_log syslog:server=unix:/dev/log,severity=notice;
  9. pid logs/nginx.pid;
  10. worker_rlimit_nofile 1024;
  11. events {
  12. worker_connections 800;
  13. }
  14. http {
  15. include mime.types;
  16. default_type application/octet-stream;
  17. index index.html index.htm;
  18. #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  19. # '$status $body_bytes_sent "$http_referer" '
  20. # '"$http_user_agent" "$http_x_forwarded_for"';
  21. #access_log logs/access.log main;
  22. #access_log syslog:server=unix:/dev/log,severity=notice main;
  23. #tcp_nopush on;
  24. #keepalive_timeout 0;
  25. keepalive_timeout 65;
  26. #gzip on;
  27. server_tokens off;
  28. server {
  29. listen 80;
  30. listen [::]:80;
  31. server_name localhost;
  32. root /var/www/htdocs;
  33. #charset koi8-r;
  34. #access_log logs/host.access.log main;
  35. #error_page 404 /404.html;
  36. # redirect server error pages to the static page /50x.html
  37. #
  38. error_page 500 502 503 504 /50x.html;
  39. location = /50x.html {
  40. root /var/www/htdocs;
  41. }
  42. # FastCGI to CGI wrapper server
  43. #
  44. #location /cgi-bin/ {
  45. # fastcgi_pass unix:run/slowcgi.sock;
  46. # fastcgi_split_path_info ^(/cgi-bin/[^/]+)(.*);
  47. # fastcgi_param PATH_INFO $fastcgi_path_info;
  48. # include fastcgi_params;
  49. #}
  50. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  51. #
  52. #location ~ \.php$ {
  53. # proxy_pass http://127.0.0.1;
  54. #}
  55. # pass the PHP scripts to FastCGI server listening on unix socket
  56. #
  57. #location ~ \.php$ {
  58. # try_files $uri $uri/ =404;
  59. # fastcgi_pass unix:run/php-fpm.sock;
  60. # fastcgi_index index.php;
  61. # fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  62. # include fastcgi_params;
  63. #}
  64. # deny access to .htaccess files, if Apache's document root
  65. # concurs with nginx's one
  66. #
  67. #location ~ /\.ht {
  68. # deny all;
  69. #}
  70. }
  71. # another virtual host using mix of IP-, name-, and port-based configuration
  72. #
  73. #server {
  74. # listen 8000;
  75. # listen somename:8080;
  76. # server_name somename alias another.alias;
  77. # root /var/www/htdocs;
  78. #}
  79. # HTTPS server
  80. #
  81. #server {
  82. # listen 443;
  83. # server_name localhost;
  84. # root /var/www/htdocs;
  85. # ssl on;
  86. # ssl_certificate /etc/ssl/server.crt;
  87. # ssl_certificate_key /etc/ssl/private/server.key;
  88. # ssl_session_timeout 5m;
  89. # ssl_session_cache shared:SSL:1m;
  90. # ssl_ciphers HIGH:!aNULL:!MD5:!RC4;
  91. # ssl_prefer_server_ciphers on;
  92. #}
  93. include /etc/nginx/conf.d/*.conf;
  94. }