From 125f182635e4c42712e6a793d2e5660767b79b30 Mon Sep 17 00:00:00 2001 From: Brian Wells Date: Thu, 25 Mar 2021 14:44:14 -0500 Subject: [PATCH 1/4] Update templates/nginx.conf.j2 with send_timeout variable. --- templates/nginx.conf.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2 index 7cdec60..6db48c1 100644 --- a/templates/nginx.conf.j2 +++ b/templates/nginx.conf.j2 @@ -40,6 +40,8 @@ http { keepalive_timeout {{ nginx_keepalive_timeout }}; keepalive_requests {{ nginx_keepalive_requests }}; + send_timeout {{ nginx_send_timeout }}; + server_tokens {{ nginx_server_tokens }}; {% if nginx_proxy_cache_path %} proxy_cache_path {{ nginx_proxy_cache_path }}; From 6779158d5784b2fe1191efb62331b232187f3ef3 Mon Sep 17 00:00:00 2001 From: Brian Wells Date: Thu, 25 Mar 2021 14:45:07 -0500 Subject: [PATCH 2/4] Update defaults/main.yml with better production defaults. --- defaults/main.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 0509dbe..b244a1d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -30,10 +30,12 @@ nginx_sendfile: "on" nginx_tcp_nopush: "on" nginx_tcp_nodelay: "on" -nginx_keepalive_timeout: "65" +nginx_keepalive_timeout: "10" nginx_keepalive_requests: "100" -nginx_server_tokens: "on" +nginx_send_timeout: "10" + +nginx_server_tokens: "off" nginx_client_max_body_size: "64m" From a629923cb12f140a2849e5828902cda41a62e34f Mon Sep 17 00:00:00 2001 From: Brian Wells Date: Thu, 25 Mar 2021 14:49:23 -0500 Subject: [PATCH 3/4] Update templates/nginx.conf.j2 to remove indentation on http_begin and http_end blocks. --- templates/nginx.conf.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2 index 6db48c1..59f4e2b 100644 --- a/templates/nginx.conf.j2 +++ b/templates/nginx.conf.j2 @@ -19,7 +19,7 @@ events { {% endblock %} http { - {% block http_begin %}{% endblock %} +{% block http_begin %}{% endblock %} {% block http_basic %} include {{ nginx_mime_file_path }}; @@ -79,5 +79,5 @@ http { {% endif %} {% endblock %} - {% block http_end %}{% endblock %} +{% block http_end %}{% endblock %} } From cf20c217da31aa0c492f512cf5c5b4c59eaf0053 Mon Sep 17 00:00:00 2001 From: Brian Wells Date: Thu, 25 Mar 2021 15:49:41 -0500 Subject: [PATCH 4/4] Update templates/nginx.conf.j2 to remove gzip comment. --- templates/nginx.conf.j2 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2 index 59f4e2b..9573508 100644 --- a/templates/nginx.conf.j2 +++ b/templates/nginx.conf.j2 @@ -48,9 +48,7 @@ http { {% endif %} {% endblock %} -{% block http_gzip %} - # gzip on; -{% endblock %} +{% block http_gzip %}{% endblock %} {% if nginx_extra_http_options %} {{ nginx_extra_http_options|indent(4, False) }}