Skip to content

Instantly share code, notes, and snippets.

@alch
Created January 22, 2014 11:20
Show Gist options
  • Save alch/8557113 to your computer and use it in GitHub Desktop.
Save alch/8557113 to your computer and use it in GitHub Desktop.
Varnish simple configuration for symfony 2
backend default {
.host = "127.0.0.1";
.port = "8081";
}
sub vcl_recv {
if (req.url ~ "\.(png|gif|jpg|swf|css|js)$") {
unset req.http.cookie;
}
}
sub vcl_fetch {
if (req.url ~ "\.(png|gif|jpg|swf|css|js)$") {
unset beresp.http.set-cookie;
}
}
sub vcl_recv {
if (req.url ~ "^/images") {
unset req.http.cookie;
}
}
sub vcl_fetch {
if (req.url ~ "^/images") {
unset beresp.http.set-cookie;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment