Advertisement
3psil0N

nginx conf

May 19th, 2013
111
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Based on the default config used by nginxcp.com for cPanel servers and then customized.
  2.  
  3. user nobody;
  4. # no need for more workers in the proxy mode
  5. worker_processes 2;
  6.  
  7. error_log /var/log/nginx/error.log info;
  8. worker_rlimit_nofile 20480;
  9.  
  10. worker_rlimit_core 500M;
  11. working_directory /etc/nginx/cores/;
  12.  
  13.  
  14. events {
  15. worker_connections 10240; # increase for busier servers
  16. use epoll; # you should use epoll here for Linux kernels 2.6.x
  17. }
  18. http {
  19. server_name_in_redirect off;
  20. server_names_hash_max_size 10240;
  21. server_names_hash_bucket_size 1024;
  22. include mime.types;
  23. default_type application/octet-stream;
  24. server_tokens off;
  25. # remove/commentout disable_symlinks if_not_owner;if you get Permission denied error
  26. # disable_symlinks if_not_owner;
  27. sendfile on;
  28. tcp_nopush on;
  29. tcp_nodelay on;
  30. keepalive_timeout 5;
  31. gzip on;
  32. gzip_vary on;
  33. gzip_disable "MSIE [1-6]\.";
  34. gzip_proxied any;
  35. gzip_http_version 1.1;
  36. gzip_min_length 1000;
  37. gzip_comp_level 6;
  38. gzip_buffers 16 8k;
  39. # You can remove image/png image/x-icon image/gif image/jpeg if you have slow CPU
  40. gzip_types text/plain text/xml text/css application/x-javascript application/xml application/xml+rss te$
  41. ignore_invalid_headers on;
  42. client_header_timeout 3m;
  43. client_body_timeout 3m;
  44. send_timeout 3m;
  45. reset_timedout_connection on;
  46. connection_pool_size 256;
  47. client_header_buffer_size 256k;
  48. large_client_header_buffers 4 256k;
  49. client_max_body_size 515M;
  50. client_body_buffer_size 128k;
  51. request_pool_size 32k;
  52. output_buffers 4 32k;
  53. postpone_output 1460;
  54. proxy_temp_path /tmp/nginx_proxy/;
  55. client_body_in_file_only on;
  56. log_format bytes_log "$msec $bytes_sent .";
  57.  
  58. ## SSL settings ##
  59. ssl_ciphers ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH;
  60. ssl_prefer_server_ciphers on;
  61. ssl_session_cache shared:SSL:3m;
  62. ssl_session_timeout 10m;
  63.  
  64. include "/etc/nginx/vhosts/*";
  65. include "/etc/nginx/staticvhosts/*";
  66. }
Advertisement
RAW Paste Data Copied
Advertisement