Advertisement
Guest User

Nginx.conf

a guest
Apr 21st, 2012
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. user nginx nginx;
  2. worker_processes 1;
  3. worker_priority -10;
  4.  
  5. worker_rlimit_nofile 51200;
  6. timer_resolution 100ms;
  7.  
  8. error_log logs/error.log;
  9.  
  10. pid logs/nginx.pid;
  11.  
  12. events {
  13. worker_connections 32768;
  14. use epoll;
  15. }
  16.  
  17. http {
  18.  
  19. index index.php index.html index.htm;
  20. include mime.types;
  21. default_type application/octet-stream;
  22.  
  23. sendfile on;
  24. tcp_nopush on;
  25. tcp_nodelay off;
  26. server_tokens off;
  27. server_name_in_redirect off;
  28.  
  29. keepalive_timeout 10;
  30. keepalive_disable msie6;
  31.  
  32. gzip on;
  33. gzip_vary on;
  34. gzip_disable "MSIE [1-6]\.";
  35. gzip_static on;
  36. gzip_min_length 1100;
  37. gzip_buffers 32 8k;
  38. gzip_http_version 1.0;
  39. gzip_comp_level 5;
  40. gzip_proxied any;
  41. gzip_types text/plain text/css text/javascript text/xml application/x-javascript application/xml application/xml+rss;
  42.  
  43. client_body_buffer_size 256k;
  44. client_body_in_file_only off;
  45. client_body_timeout 60s;
  46. client_header_buffer_size 256k;
  47. ## how long a connection has to complete sending
  48. ## it's headers for request to be processed
  49. client_header_timeout 20s;
  50. client_max_body_size 128m;
  51. connection_pool_size 256;
  52. directio 4m;
  53. ignore_invalid_headers on;
  54. large_client_header_buffers 4 256k;
  55. output_buffers 4 256k;
  56. postpone_output 1460;
  57. proxy_temp_path /tmp/nginx_proxy/;
  58. request_pool_size 32k;
  59. reset_timedout_connection on;
  60. send_timeout 60s;
  61.  
  62. log_format bytes_log "$msec $bytes_sent .";
  63.  
  64. open_file_cache max=5000 inactive=30s;
  65. open_file_cache_valid 120s;
  66. open_file_cache_min_uses 2;
  67. open_file_cache_errors off;
  68. open_log_file_cache max=1024 inactive=30s min_uses=2;
  69. ## limit number of concurrency connections per ip to 16
  70. ## add to your server {} section the next line
  71. ## limit_conn limit_per_ip 16;
  72. ## uncomment below line allows 500K sessions
  73. # limit_conn_log_level error;
  74. #######################################
  75. # use limit_zone for Nginx <v1.1.7 and lower
  76. # limit_zone $binary_remote_addr zone=limit_per_ip:16m;
  77. #######################################
  78. # use limit_conn_zone for Nginx >v1.1.8 and higher
  79. # limit_conn_zone $binary_remote_addr zone=limit_per_ip:16m;
  80. #######################################
  81.  
  82. include /usr/local/nginx/conf/conf.d/*.conf;
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement