nginx.conf 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. #user nobody;
  2. worker_processes 1;
  3. #error_log logs/error.log;
  4. #error_log logs/error.log notice;
  5. error_log /var/log/nginx/error.log info;
  6. #pid logs/nginx.pid;
  7. events {
  8. worker_connections 256;
  9. }
  10. http {
  11. include mime.types;
  12. default_type application/octet-stream;
  13. include sites-enabled/*.conf;
  14. #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  15. # '$status $body_bytes_sent "$http_referer" '
  16. # '"$http_user_agent" "$http_x_forwarded_for"';
  17. #access_log logs/access.log main;
  18. sendfile on;
  19. #tcp_nopush on;
  20. client_max_body_size 50M;
  21. #keepalive_timeout 0;
  22. keepalive_timeout 65;
  23. proxy_cache_path /tmp/nginx/cache/ levels=1:2 keys_zone=one:8m max_size=3000m inactive=600m;
  24. proxy_temp_path /tmp/nginx/proxy/;
  25. gzip on;
  26. gzip_comp_level 6;
  27. gzip_vary on;
  28. gzip_min_length 1000;
  29. gzip_proxied any;
  30. gzip_types text/plain text/html text/css text/xml application/json application/x-javascript application/xml application/xml+rss text/javascript;
  31. gzip_buffers 16 8k;
  32. server {
  33. listen 8080;
  34. server_name localhost;
  35. #charset koi8-r;
  36. #access_log logs/host.access.log main;
  37. location / {
  38. root html;
  39. index index.html index.htm;
  40. }
  41. #error_page 404 /404.html;
  42. # redirect server error pages to the static page /50x.html
  43. #
  44. error_page 500 502 503 504 /50x.html;
  45. location = /50x.html {
  46. root html;
  47. }
  48. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  49. #
  50. #location ~ \.php$ {
  51. # proxy_pass http://127.0.0.1;
  52. #}
  53. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  54. #
  55. #location ~ \.php$ {
  56. # root html;
  57. # fastcgi_pass 127.0.0.1:9000;
  58. # fastcgi_index index.php;
  59. # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  60. # include fastcgi_params;
  61. #}
  62. # deny access to .htaccess files, if Apache's document root
  63. # concurs with nginx's one
  64. #
  65. #location ~ /\.ht {
  66. # deny all;
  67. #}
  68. }
  69. # another virtual host using mix of IP-, name-, and port-based configuration
  70. #
  71. #server {
  72. # listen 8000;
  73. # listen somename:8080;
  74. # server_name somename alias another.alias;
  75. # location / {
  76. # root html;
  77. # index index.html index.htm;
  78. # }
  79. #}
  80. # HTTPS server
  81. #
  82. #server {
  83. # listen 443;
  84. # server_name localhost;
  85. # ssl on;
  86. # ssl_certificate cert.pem;
  87. # ssl_certificate_key cert.key;
  88. # ssl_session_timeout 5m;
  89. # ssl_protocols SSLv2 SSLv3 TLSv1;
  90. # ssl_ciphers HIGH:!aNULL:!MD5;
  91. # ssl_prefer_server_ciphers on;
  92. # location / {
  93. # root html;
  94. # index index.html index.htm;
  95. # }
  96. #}
  97. }