http purge help

Stig Sandbeck Mathisen ssm at
Tue Feb 19 06:55:40 CET 2008

Charlie Farinella <cfarinella at> writes:

> We have our vcl.conf configured like this:

You need something in your vcl_recv as well, to match against the
purge acl, and force it to "lookup" on an acl match.  It would go
nicely inside the "pipe if not GET or HEAD request" from the default
vcl like this:

sub vcl_recv {
  # [...]

  if (req.request != "GET" && req.request != "HEAD") {
    if (req.request == "PURGE") {
      if (!client.ip ~ purge) {
        error 405 "Not allowed.";
    set req.http.connection = "close";

  # [...]

Stig Sandbeck Mathisen, Linpro

More information about the varnish-misc mailing list