Advertisement
felixcool

nginx.conf

Jan 3rd, 2015
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.54 KB | None | 0 0
  1. user www-data;
  2. worker_processes auto;
  3. worker_rlimit_nofile 100000;
  4. pid /run/nginx.pid;
  5.  
  6. events {
  7. worker_connections 4096;
  8. multi_accept on;
  9. }
  10.  
  11. http {
  12. ##
  13. # EasyEngine Settings
  14. ##
  15.  
  16. server_tokens off;
  17. reset_timedout_connection on;
  18. add_header X-Powered-By "EasyEngine 2.2.2";
  19. add_header rt-Fastcgi-Cache $upstream_cache_status;
  20.  
  21. # Limit Request
  22. limit_req_status 403;
  23. limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;
  24.  
  25. # Proxy Settings
  26. # set_real_ip_from proxy-server-ip;
  27. # real_ip_header X-Forwarded-For;
  28.  
  29. fastcgi_read_timeout 300;
  30. client_max_body_size 100m;
  31.  
  32.  
  33. ##
  34. # Basic Settings
  35. ##
  36.  
  37. sendfile on;
  38. tcp_nopush on;
  39. tcp_nodelay on;
  40. # Limit Request
  41. limit_req_status 403;
  42. limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;
  43.  
  44. # Proxy Settings
  45. # set_real_ip_from proxy-server-ip;
  46. # real_ip_header X-Forwarded-For;
  47.  
  48. fastcgi_read_timeout 300;
  49. client_max_body_size 100m;
  50.  
  51.  
  52. ##
  53. # Basic Settings
  54. ##
  55.  
  56. sendfile on;
  57. tcp_nopush on;
  58. tcp_nodelay on;
  59. keepalive_timeout 30;
  60. types_hash_max_size 2048;
  61. # server_tokens off;
  62.  
  63. # server_names_hash_bucket_size 64;
  64. # server_name_in_redirect off;
  65.  
  66. include /etc/nginx/mime.types;
  67. default_type application/octet-stream;
  68.  
  69. ##
  70. # Logging Settings
  71. ##
  72.  
  73. access_log /var/log/nginx/access.log;
  74. error_log /var/log/nginx/error.log;
  75.  
  76. log_format rt_cache '$remote_addr $upstream_response_time $upstream_cache_status [$time_local] '
  77. '$http_host "$request" $status $body_bytes_sent '
  78. '"$http_referer" "$http_user_agent"';
  79. types_hash_max_size 2048;
  80. # server_tokens off;
  81.  
  82. # server_names_hash_bucket_size 64;
  83. # server_name_in_redirect off;
  84.  
  85. include /etc/nginx/mime.types;
  86. default_type application/octet-stream;
  87.  
  88. ##
  89. # Logging Settings
  90. ##
  91.  
  92. access_log /var/log/nginx/access.log;
  93. error_log /var/log/nginx/error.log;
  94.  
  95. log_format rt_cache '$remote_addr $upstream_response_time $upstream_cache_status [$time_local] '
  96. '$http_host "$request" $status $body_bytes_sent '
  97. '"$http_referer" "$http_user_agent"';
  98.  
  99. ##
  100. # Gzip Settings
  101. ##
  102.  
  103. gzip on;
  104. gzip_disable "msie6";
  105.  
  106. gzip_vary on;
  107. gzip_proxied any;
  108. gzip_comp_level 6;
  109. gzip_buffers 16 8k;
  110. gzip_http_version 1.1;
  111. gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
  112.  
  113. ##
  114. # Virtual Host Configs
  115. ##
  116.  
  117. include /etc/nginx/conf.d/*.conf;
  118.  
  119. ##
  120. # Gzip Settings
  121. ##
  122.  
  123. gzip on;
  124. gzip_disable "msie6";
  125.  
  126. gzip_vary on;
  127. gzip_proxied any;
  128. gzip_comp_level 6;
  129. gzip_buffers 16 8k;
  130. gzip_http_version 1.1;
  131. gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
  132.  
  133. ##
  134. # Virtual Host Configs
  135. ##
  136.  
  137. include /etc/nginx/conf.d/*.conf;
  138. include /etc/nginx/sites-enabled/*;
  139. }
  140.  
  141.  
  142. #mail {
  143. # # See sample authentication script at:
  144. # # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
  145. #
  146. # # auth_http localhost/auth.php;
  147. # # pop3_capabilities "TOP" "USER";
  148. # # imap_capabilities "IMAP4rev1" "UIDPLUS";
  149. #
  150. # server {
  151. # listen localhost:110;
  152. # protocol pop3;
  153. # proxy on;
  154. # }
  155. #
  156. # server {
  157. # listen localhost:143;
  158. }
  159.  
  160.  
  161. #mail {
  162. # # See sample authentication script at:
  163. # # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
  164. #
  165. # # auth_http localhost/auth.php;
  166. # # pop3_capabilities "TOP" "USER";
  167. # # imap_capabilities "IMAP4rev1" "UIDPLUS";
  168. #
  169. # server {
  170. # listen localhost:110;
  171. # protocol pop3;
  172. # proxy on;
  173. # }
  174. #
  175. # server {
  176. # listen localhost:143;
  177. # protocol imap;
  178. # proxy on;
  179. # }
  180. #}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement