Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
esi-6.x-2.x comes with a couple of reccomended configuration files; applicable to varnishd (varnish-3.0.2 revision 55e70a4) from Debian "Wheezy" are default_3.0.vcl
and esi_blocks_3.0.vcl
. However, when I put those snippets into my default.vcl, I'm getting an error like this:
# /etc/init.d/varnish reload
Reloading HTTP accelerator: varnishd
Command failed with error code 106
Message from VCC-compiler:
Expected ';' got 'esi'
(program line 174), at
('input' Line 462 Pos 5)
esi;
----###-
Running VCC-compiler failed, exit 1
VCL compilation failed
Error: vcl.load … /etc/varnish/default.vcl failed
failed!
The error references to this section:
sub vcl_fetch {
# don't ESI anything with a 3/4 letter extension
# (e.g. don't try to ESI images, css, etc).
if (! req.url ~ "\..{3,4}$") {
set beresp.do_esi = true
esi;
}
call esi_block__fetch;
}
The VCL compiles only, if I comment out the "if … set beresp … esi;" statement.
The alternative syntax from 'esi' modules' ./docs/default.vcl
doesn't work either:
sub vcl_fetch {
# don't ESI anything with a 3/4 letter extension
# (e.g. don't try to ESI images, css, etc).
if (! req.url ~ "\..{3,4}$") {
esi;
}
call esi_block__fetch;
}
What am I missin?
Comments
Comment #1
asb CreditAttribution: asb commentedAs suggested in the Varnish docs, I'm using this snippet in
sub vcl_fetch {}
:Comment #2
dstuart CreditAttribution: dstuart at Axis12 Limited commentedNo longer supported