improve sendfile & keepalive settings

This commit is contained in:
VirtuBox 2018-09-12 20:51:59 +02:00
parent 632fb7e9ca
commit bd163adf0e
8 changed files with 70 additions and 34 deletions

View File

@ -18,10 +18,16 @@ http
## ##
sendfile on; sendfile on;
sendfile_max_chunk 512k;
tcp_nopush on; tcp_nopush on;
tcp_nodelay on; tcp_nodelay on;
keepalive_timeout 30;
types_hash_max_size 2048; keepalive_timeout 8;
keepalive_requests 500;
lingering_time 20s;
lingering_timeout 5s;
server_tokens off; server_tokens off;
reset_timedout_connection on; reset_timedout_connection on;

View File

@ -18,10 +18,16 @@ http
## ##
sendfile on; sendfile on;
sendfile_max_chunk 512k;
tcp_nopush on; tcp_nopush on;
tcp_nodelay on; tcp_nodelay on;
keepalive_timeout 30;
types_hash_max_size 2048; keepalive_timeout 8;
keepalive_requests 500;
lingering_time 20s;
lingering_timeout 5s;
server_tokens off; server_tokens off;
reset_timedout_connection on; reset_timedout_connection on;
@ -50,13 +56,13 @@ http
#See - https://www.nginx.com/blog/thread-pools-boost-performance-9x/ #See - https://www.nginx.com/blog/thread-pools-boost-performance-9x/
aio threads; aio threads;
# tls dynamic records patch directive # tls dynamic records patch directive
ssl_dyn_rec_enable on; ssl_dyn_rec_enable on;
# nginx-vts-status module # nginx-vts-status module
#vhost_traffic_status_zone; vhost_traffic_status_zone;
resolver 8.8.8.8 1.1.1.1 valid=300s; resolver 8.8.8.8 1.1.1.1 valid=300s;
resolver_timeout 10; resolver_timeout 10;
@ -104,7 +110,7 @@ http
log_format rt_cache '$remote_addr_ipscrub $upstream_response_time $upstream_cache_status [$time_local] ' log_format rt_cache '$remote_addr_ipscrub $upstream_response_time $upstream_cache_status [$time_local] '
'$http_host "$request" $status $body_bytes_sent ' '$http_host "$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" $server_protocol'; '"$http_referer" "$http_user_agent" $server_protocol';
# ipscrub settings # ipscrub settings
ipscrub_period_seconds 3600; ipscrub_period_seconds 3600;

View File

@ -18,10 +18,16 @@ http
## ##
sendfile on; sendfile on;
sendfile_max_chunk 512k;
tcp_nopush on; tcp_nopush on;
tcp_nodelay on; tcp_nodelay on;
keepalive_timeout 30;
types_hash_max_size 2048; keepalive_timeout 8;
keepalive_requests 500;
lingering_time 20s;
lingering_timeout 5s;
server_tokens off; server_tokens off;
reset_timedout_connection on; reset_timedout_connection on;

View File

@ -25,12 +25,12 @@ server {
location / { location / {
try_files $uri $uri/ /index.php?$args; try_files $uri $uri/ /index.php?$args;
} }
# nginx-vts-status # nginx-vts-status
#location /vts_status { location /vts_status {
#vhost_traffic_status_display; vhost_traffic_status_display;
#vhost_traffic_status_display_format html; vhost_traffic_status_display_format html;
#} }
# Display menu at location /fpm/status/ # Display menu at location /fpm/status/
location = /fpm/status/ {} location = /fpm/status/ {}

View File

@ -18,10 +18,16 @@ http
## ##
sendfile on; sendfile on;
sendfile_max_chunk 512k;
tcp_nopush on; tcp_nopush on;
tcp_nodelay on; tcp_nodelay on;
keepalive_timeout 30;
types_hash_max_size 2048; keepalive_timeout 8;
keepalive_requests 500;
lingering_time 20s;
lingering_timeout 5s;
server_tokens off; server_tokens off;
reset_timedout_connection on; reset_timedout_connection on;

View File

@ -18,10 +18,16 @@ http
## ##
sendfile on; sendfile on;
sendfile_max_chunk 512k;
tcp_nopush on; tcp_nopush on;
tcp_nodelay on; tcp_nodelay on;
keepalive_timeout 30;
types_hash_max_size 2048; keepalive_timeout 8;
keepalive_requests 500;
lingering_time 20s;
lingering_timeout 5s;
server_tokens off; server_tokens off;
reset_timedout_connection on; reset_timedout_connection on;
@ -50,13 +56,13 @@ http
#See - https://www.nginx.com/blog/thread-pools-boost-performance-9x/ #See - https://www.nginx.com/blog/thread-pools-boost-performance-9x/
aio threads; aio threads;
# tls dynamic records patch directive # tls dynamic records patch directive
ssl_dyn_rec_enable on; ssl_dyn_rec_enable on;
# nginx-vts-status module # nginx-vts-status module
#vhost_traffic_status_zone; vhost_traffic_status_zone;
resolver 8.8.8.8 1.1.1.1 valid=300s; resolver 8.8.8.8 1.1.1.1 valid=300s;
resolver_timeout 10; resolver_timeout 10;
@ -104,7 +110,7 @@ http
log_format rt_cache '$remote_addr_ipscrub $upstream_response_time $upstream_cache_status [$time_local] ' log_format rt_cache '$remote_addr_ipscrub $upstream_response_time $upstream_cache_status [$time_local] '
'$http_host "$request" $status $body_bytes_sent ' '$http_host "$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" $server_protocol'; '"$http_referer" "$http_user_agent" $server_protocol';
# ipscrub settings # ipscrub settings
ipscrub_period_seconds 3600; ipscrub_period_seconds 3600;

View File

@ -18,10 +18,16 @@ http
## ##
sendfile on; sendfile on;
sendfile_max_chunk 512k;
tcp_nopush on; tcp_nopush on;
tcp_nodelay on; tcp_nodelay on;
keepalive_timeout 30;
types_hash_max_size 2048; keepalive_timeout 8;
keepalive_requests 500;
lingering_time 20s;
lingering_timeout 5s;
server_tokens off; server_tokens off;
reset_timedout_connection on; reset_timedout_connection on;

View File

@ -25,12 +25,12 @@ server {
location / { location / {
try_files $uri $uri/ /index.php?$args; try_files $uri $uri/ /index.php?$args;
} }
# nginx-vts-status # nginx-vts-status
#location /vts_status { location /vts_status {
#vhost_traffic_status_display; vhost_traffic_status_display;
#vhost_traffic_status_display_format html; vhost_traffic_status_display_format html;
#} }
# Display menu at location /fpm/status/ # Display menu at location /fpm/status/
location = /fpm/status/ {} location = /fpm/status/ {}