Skip to content

Instantly share code, notes, and snippets.

@KristianLyng
Created September 10, 2012 12:40
Show Gist options
  • Select an option

  • Save KristianLyng/3690688 to your computer and use it in GitHub Desktop.

Select an option

Save KristianLyng/3690688 to your computer and use it in GitHub Desktop.
backend betelgeuse {
.host = "178.255.149.146";
}
sub vcl_recv {
set req.http.host = "kly.no";
if (req.request == "PURGE") {
return (lookup);
}
}
sub vcl_hit {
if (req.request == "PURGE") {
purge;
error 750 "restart";
}
}
sub vcl_miss {
if (req.request == "PURGE") {
purge;
error 750 "restart";
}
}
sub vcl_error {
if (req.request == "PURGE" && obj.status == 750) {
set req.request = "GET";
set req.url = "/tomfil";
return (restart);
}
}
// Test vcl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment