Unknown variable 'beresp.url'

Tobias Hensel hensel.tobias at googlemail.com
Fri Jun 17 11:29:03 CEST 2011


I try doing my first steps with varnish.
I use debian and installed varnish from your repos.
varnishd -V says varnishd (varnish-2.1.5 SVN )

I try to rebuild some of your examples.
On http://www.varnish-cache.org/docs/2.1/tutorial/vcl.html

Example 2 - manipulating beresp says:

sub vcl_fetch {
    if (beresp.url ~ "\.(png|gif|jpg)$") {
      unset beresp.http.set-cookie;
      set beresp.ttl = 3600;

If I use this in my config (I did not set anything else there) I get the 
following error:

root at debian:~# /etc/init.d/varnish start 
Starting HTTP accelerator: varnishd failed!
storage_file: filename: /var/lib/varnish/varnish_storage.bin size 500 MB.
Message from VCC-compiler:
Unknown variable 'beresp.url'
At: (input Line 14 Pos 10)
      if (beresp.url ~ "\.(png|gif|jpg)$") {
Running VCC-compiler failed, exit 1
VCL compilation failed

Did I miss something?



More information about the varnish-misc mailing list