varnishd config.

Dan Deshayes dan.deshayes at
Mon Oct 22 11:27:19 CEST 2007

I'm having som problems getting my varnish to work as i want to.
I'm running a minimal config:

backend default {
        set = "<host>";
        set backend.port = "<port>";

sub vcl_recv {
 if (req.request == "GET" && req.url ~ "\.(gif|png|css|js)$") {

When I go to the page it starts caching all the files and on reload all 
the files are delivered from varnishd.
But when i go to a certain php on the page it forwards every request to 
apache and when going back to one of the former working tabs they also go

I put a few expire-lines in my virtualhost-config:
        ExpiresActive On
        ExpiresByType image/gif "access plus 3 hours"
and so on, but it won't work.

Here are two examples of the headers tx:ed and rx:ed:

I've noticed that in the working example apache provides last-modified 
and a few other things in the response, but why doesn't it do that in 
the nonworking?
Its the same virtualhost with all the same settings but another .php file.
I'm always using fully reload when testing so the browsers cache doesn't 
lead me astray.

Thanks in advance
Regards Dan

More information about the varnish-misc mailing list