diff --git a/templates/haproxy_cfg.jinja2 b/templates/haproxy_cfg.jinja2
index 1d98090060a235fd7e432f926d3dcf7101ca0802..9f8559e42ec912137006e9443e1352efb0886934 100644
--- a/templates/haproxy_cfg.jinja2
+++ b/templates/haproxy_cfg.jinja2
@@ -165,9 +165,9 @@ frontend http_in
   acl is_ban method BAN
   use_backend backend_varnish if is_ban
   acl domain_ignores_varnish hdr(host) -i -n -f /etc/haproxy/ignore_varnish.list
-  use_backend backend_varnish_bigpipe if domain_uses_bigpipe !domain_ignores_varnish
   acl static_content path_end .jpg .jpeg .gif .png .ico .swf .css .js .htm .html .ttf .woff .woff2 .svg .eot
   acl static_content_private path_beg /system/
+  use_backend backend_varnish_bigpipe if static_content !static_content_private domain_uses_bigpipe !domain_ignores_varnish
   use_backend backend_varnish if static_content !static_content_private !domain_ignores_varnish
 {% endif %}
 {% if 'webserver' in groups %}
@@ -298,9 +298,9 @@ frontend https_in_{{ cert.ip }}
   acl domain_uses_bigpipe hdr(host) -i -n -f /etc/haproxy/use_bigpipe.list
 {% if varnish_host|default(false) %}
   acl domain_ignores_varnish hdr(host) -i -n -f /etc/haproxy/ignore_varnish.list
-  use_backend backend_varnish_bigpipe if domain_uses_bigpipe !domain_ignores_varnish
   acl static_content path_end .jpg .jpeg .gif .png .ico .swf .css .js .htm .html .ttf .woff .woff2 .svg .eot
   acl static_content_private path_beg /system/
+  use_backend backend_varnish_bigpipe if static_content !static_content_private domain_uses_bigpipe !domain_ignores_varnish
   use_backend backend_varnish if static_content !static_content_private !domain_ignores_varnish
 {% endif %}
 {% if 'webserver' in groups %}