Browse Source

move gzip to separate block as it's pretty common to override

Oskar Schöldström 8 years ago
parent
commit
c9a6015281
1 changed files with 4 additions and 2 deletions
  1. 4 2
      templates/nginx.conf.j2

+ 4 - 2
templates/nginx.conf.j2

@@ -41,13 +41,15 @@ http {
     keepalive_requests {{ nginx_keepalive_requests }};
     keepalive_requests {{ nginx_keepalive_requests }};
 
 
     server_tokens {{ nginx_server_tokens }};
     server_tokens {{ nginx_server_tokens }};
-    #gzip  on;
-
 {% if nginx_proxy_cache_path %}
 {% if nginx_proxy_cache_path %}
     proxy_cache_path {{ nginx_proxy_cache_path }};
     proxy_cache_path {{ nginx_proxy_cache_path }};
 {% endif %}
 {% endif %}
 {% endblock %}
 {% endblock %}
 
 
+{% block http_gzip %}
+    # gzip on;
+{% endblock %}
+
 {% if nginx_extra_http_options %}
 {% if nginx_extra_http_options %}
     {{ nginx_extra_http_options|indent(4, False) }}
     {{ nginx_extra_http_options|indent(4, False) }}
 {% endif %}
 {% endif %}