varnish/vcl.conf

31 lines
574 B
Plaintext

#
# This is a basic VCL configuration file for varnish. See the vcl(7)
# man page for details on VCL syntax and semantics.
#
# $Id: vcl.conf 1200 2006-10-19 09:21:42Z des $
#
backend default {
.host = "127.0.0.1";
.port = "8080";
}
sub vcl_recv {
# pass mode can't handle POST (yet)
if (req.request == "POST") {
return(pipe);
}
# don't bother caching large files
if(req.url ~ "\.(pdf|mp3|flv|mov|mp4|mpg|mpeg|avi|dmg)") {
return(pipe);
}
# force lookup even when cookies are present
if (req.request == "GET" && req.http.cookie) {
return(lookup);
}
}