I believe that the Apache mod_deflate must be disabled for this to work. Otherwise you get the dreaded

   12 ESI_xmlerror c No ESI processing, first char not ‘< '

in the varnishlog.

Comments

Assigned:Unassigned» manarth
Status:Active» Needs work

By default, Varnish will only process ESIs on XML-valid documents, which is why it fails for gzipped docs. This can be overridden with a startup config: setting esi_syntax=0x3

It doesn't address the problem though: Varnish cannot read gzipped/compressed pages.
I'll add it to the docs :-)

please please add it to the docs :)
nasty thing

hmm how/where to apply this esi_syntax parameter?
would be thankful for some help. hard to find it..

Version:6.x-1.0-beta1» 6.x-2.x-dev
Status:Needs work» Active

Moving this to 2.x

Title:Documentation: mod_deflate must be turned offESI Varnish Apache - Documentation: mod_deflate must be turned off
Assigned:manarth» Unassigned

To answer this very old question,
you can add the config to your varnish daemon opts, something like

DAEMON_OPTS="-a :6081 \
             -T localhost:6082 \
             -f /etc/varnish/default.vcl \
             -S /etc/varnish/secret \
             -p esi_syntax=0x1 \
             -s malloc,1G