Varnish and mod_deflate support at at
Mon Nov 30 17:42:08 CET 2015

I have been using varnish 3.7 only as a proxy server for apache and have 
a following lines in default.vcl which should handle the encodings:

if (req.http.Accept-Encoding) {
     if (req.http.Accept-Encoding ~ "gzip") {
       # If the browser supports it, we'll use gzip.
       #set req.http.Accept-Encoding = "gzip";
       unset req.http.Accept-Encoding;
     else if (req.http.Accept-Encoding ~ "deflate") {
       # Next, try deflate if it is supported.
       set req.http.Accept-Encoding = "deflate";
     else {
       # Unknown algorithm. Remove it and send unencoded.
       unset req.http.Accept-Encoding;

Although, customers which have mod_deflate rules in .htaccess file 
experience the problem that their sites are not compressed. If I pipe 
the site to apache site is compressed. SO, my question is what is the 
problem with the deflate and my varnish configuration? Is it required to 
add something other to varnish to work the deflate? I tried a couple of 
things which I found in the net, but nothing worked.

Thank you in advance for your answers!

Best regards,

More information about the varnish-misc mailing list