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.


manarth’s picture

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 :-)

AgaPe’s picture

please please add it to the docs :)
nasty thing

AgaPe’s picture

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

mikeytown2’s picture

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

Moving this to 2.x

mikeytown2’s picture

Title: Documentation: mod_deflate must be turned off » ESI Varnish Apache - Documentation: mod_deflate must be turned off
Assigned: manarth » Unassigned
branana’s picture

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