http purge help
Charlie Farinella
cfarinella at appropriatesolutions.com
Tue Feb 19 17:20:12 CET 2008
On Tuesday 19 February 2008, Stig Sandbeck Mathisen wrote:
> 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.";
> }
> lookup;
> }
> set req.http.connection = "close";
> pipe;
> }
>
> # [...]
> }
My error, we have this section in our vcl file, I forgot to include it.
Perhaps we just misunderstand what should be happening. What exactly
will the command 'PURGE /' remove from the cache? We are trying to
empty it.
We need to have web developers have the ability to clear the Varnish
cache. Currently we are doing it for them by telneting to the Varnish
management interface and running 'url.purge *'. We'd like to protect
them (and us) from that if possible.
I got several responses, thanks to all, but no joy so far.
--
------------------------------------------------------------------------
Charles Farinella
Appropriate Solutions, Inc. (www.AppropriateSolutions.com)
cfarinella at AppropriateSolutions.com
voice: 603.924.6079 fax: 603.924.8668
More information about the varnish-misc
mailing list