Add tcp_nopush and tcp_nodelay vars (#197)

This commit is contained in:
Seena Fallah 2019-11-26 16:44:46 +03:30 committed by Alessandro Fael Garcia
parent 1771878e9e
commit ce58eeabbd
3 changed files with 11 additions and 1 deletions

View File

@ -359,6 +359,8 @@ nginx_main_template:
access_log_location: access_log_location:
- name: main - name: main
location: /var/log/nginx/access.log location: /var/log/nginx/access.log
tcp_nopush: true
tcp_nodelay: true
keepalive_timeout: 65 keepalive_timeout: 65
cache: false cache: false
rate_limit: false rate_limit: false

View File

@ -168,6 +168,8 @@ nginx_main_template:
access_log_location: access_log_location:
- name: main - name: main
location: /var/log/nginx/access.log location: /var/log/nginx/access.log
tcp_nopush: true
tcp_nodelay: true
keepalive_timeout: 65 keepalive_timeout: 65
cache: false cache: false
rate_limit: false rate_limit: false

View File

@ -71,7 +71,13 @@ http {
{% endfor %} {% endfor %}
sendfile on; sendfile on;
#tcp_nopush on;
{% if nginx_main_template.http_settings.tcp_nopush is defined and nginx_main_template.tcp_nopush %}
tcp_nopush on;
{% endif %}
{% if nginx_main_template.http_settings.tcp_nodelay is defined and nginx_main_template.tcp_nodelay %}
tcp_nodelay on;
{% endif %}
{% if nginx_main_template.http_settings.server_tokens is defined and nginx_main_template.http_settings.server_tokens | length %} {% if nginx_main_template.http_settings.server_tokens is defined and nginx_main_template.http_settings.server_tokens | length %}
server_tokens {{ nginx_main_template.http_settings.server_tokens }}; server_tokens {{ nginx_main_template.http_settings.server_tokens }};