Purging contents
Paras Fadte
plfgoa at gmail.com
Thu Jan 22 06:21:34 CET 2009
Hi Poul,
For applying HTTP purge the VCL code specified on
http://varnish.projects.linpro.no/wiki/VCLExamplePurging shows as
following:
sub vcl_recv {
if (req.request == "PURGE") {
if (!client.ip ~ purge) {
error 405 "Not allowed.";
}
lookup;
}
should it have "else" so that it becomes
sub vcl_recv {
if (req.request == "PURGE") {
if (!client.ip ~ purge) {
error 405 "Not allowed.";
}
else {
lookup;
}
}
Also when I telnet to varnish listen port (not the management port) it
seems to close the connection after about 4-5 seconds automatically.
what could be the issue ? Telnetting to management port works fines.
Thanks.
-Paras
On Wed, Jan 21, 2009 at 8:22 PM, Paras Fadte <plfgoa at gmail.com> wrote:
> Hi Poul,
>
> Can one specify host when purging using command line ?
>
> Thank you.
>
> -Paras
>
> On Wed, Jan 21, 2009 at 7:45 PM, Poul-Henning Kamp <phk at phk.freebsd.dk> wrote:
>> In message <8318f61f0901210508i25fb1385w91573182d8cd247 at mail.gmail.com>, Audun
>> Ytterdal writes:
>>>On Wed, Jan 21, 2009 at 12:38 PM, Poul-Henning Kamp <phk at phk.freebsd.dk> wrote:
>>>> In message <75cf5800901210319j1a2741bdp171bdffad920b6df at mail.gmail.com>, Paras Fadte writes:
>>
>>
>>>Does that mean that vcl_miss in this part of the documentation never
>>>would be run?
>>>
>>>http://varnish.projects.linpro.no/wiki/VCLExamplePurging
>>
>> Well, this is the other way to do purges: look up the single object
>> you want, and blast it away.
>>
>> That method does not involve any regular expressions, and consequently
>> you have to be 100% precise to find the single object you want to
>> get rid off.
>>
>> --
>> 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