Skip to content

Commit ce58eea

Browse files
clwluvwalessfg
authored andcommitted
Add tcp_nopush and tcp_nodelay vars (#197)
1 parent 1771878 commit ce58eea

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,8 @@ nginx_main_template:
359359
access_log_location:
360360
- name: main
361361
location: /var/log/nginx/access.log
362+
tcp_nopush: true
363+
tcp_nodelay: true
362364
keepalive_timeout: 65
363365
cache: false
364366
rate_limit: false

defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ nginx_main_template:
168168
access_log_location:
169169
- name: main
170170
location: /var/log/nginx/access.log
171+
tcp_nopush: true
172+
tcp_nodelay: true
171173
keepalive_timeout: 65
172174
cache: false
173175
rate_limit: false

templates/nginx.conf.j2

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,13 @@ http {
7171
{% endfor %}
7272

7373
sendfile on;
74-
#tcp_nopush on;
74+
75+
{% if nginx_main_template.http_settings.tcp_nopush is defined and nginx_main_template.tcp_nopush %}
76+
tcp_nopush on;
77+
{% endif %}
78+
{% if nginx_main_template.http_settings.tcp_nodelay is defined and nginx_main_template.tcp_nodelay %}
79+
tcp_nodelay on;
80+
{% endif %}
7581

7682
{% if nginx_main_template.http_settings.server_tokens is defined and nginx_main_template.http_settings.server_tokens | length %}
7783
server_tokens {{ nginx_main_template.http_settings.server_tokens }};

0 commit comments

Comments
 (0)