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" diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2 index 7cdec60..9573508 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 }}; @@ -40,15 +40,15 @@ 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 }}; {% endif %} {% endblock %} -{% block http_gzip %} - # gzip on; -{% endblock %} +{% block http_gzip %}{% endblock %} {% if nginx_extra_http_options %} {{ nginx_extra_http_options|indent(4, False) }} @@ -77,5 +77,5 @@ http { {% endif %} {% endblock %} - {% block http_end %}{% endblock %} +{% block http_end %}{% endblock %} }