url.purge

Pavel Pragin ppragin at SolutionSet.com
Mon Apr 21 16:52:50 CEST 2008


Hello,

Can you please help me put it the right order. I will be very great
full.

Thanks


-----Original Message-----
From: phk at critter.freebsd.dk [mailto:phk at critter.freebsd.dk] On Behalf
Of Poul-Henning Kamp
Sent: Monday, April 21, 2008 7:49 AM
To: Pavel Pragin
Cc: Sven Tietje; varnish-misc at projects.linpro.no
Subject: Re: url.purge 

In message
<DF3A409993D9D940BA8B02F0C396CF8A014C17B8 at mailserver.form-studios.co
m>, "Pavel Pragin" writes:
>I tried the whole example it still doesn't work.
>Here is my whole vcl file:

Order is important here...

Your first vcl_recv {} sends the PURGE request to pipe before the
second copy ever gets at it.

>         sub vcl_recv {
[...]

>             if (req.request !=3D "GET" && req.request !=3D "HEAD") {
>                 pipe;
>             }
[...]
>         }

>sub vcl_recv {
>        if (req.request =3D=3D "PURGE") {
>                if (!client.ip ~ purge) {
>                        error 405 "Not allowed.";
>                }
>                lookup;
>        }
>}

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by
incompetence.



More information about the varnish-misc mailing list