Varnish seeming to not respect mod_expires and mod_headers expires
ntwrkd
ntwrkd at gmail.com
Wed Jan 20 00:22:51 CET 2010
I read the tutorial at
http://varnish.projects.linpro.no/wiki/VCLExampleLongerCaching which
states that Varnish should respect the Expires headers; however, it
doesn't seem to be inherited by my implementation.
I have a pretty standard config
backend default {
.host = "127.0.0.1";
.port = "80";
}
sub vcl_recv {
if (req.url ~
"\.(jpg|jpeg|gif|png|tiff|tif|svg|swf|ico|mp3|mp4|m4a|ogg|mov|avi|wmv)$")
{
lookup;
}
if (req.url ~ "\.(css|js)$") {
lookup;
}
}
sub vcl_fetch {
if( req.request != "POST" )
{
unset obj.http.set-cookie;
}
set obj.ttl = 600s;
set obj.prefetch = -30s;
unset obj.http.Server;
set obj.http.Server = "Apache/2.2.10";
deliver;
}
More information about the varnish-dev
mailing list