Problems with purging /.

Thomas Westlund thomas.westlund at aftenposten.no
Wed Apr 25 14:10:16 CEST 2007


Hi,

I have a problem purging the / pages on a varnish installation.

I have configured the following in varnish.vcl

sub vcl_hit {
        if (req.request == "PURGE") {
                set obj.ttl = 0s;
                error 200 "Purged.";
        } else {
                deliver;
        }
}

and

sub vcl_timeout{
        discard;
}


When I try to purge an url via the http-call it works nicely for everyting execpt the / (for example the front page).

The call I send to varnish is constructed like this:

# telnet varnish 80
PURGE / HTTP/1.0
Host: www.somedomain.no

And the response it gives is this:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML>
  <HEAD>
    <TITLE>200 OK</TITLE>
  </HEAD>
  <BODY>
    <H1>Error 200 OK</H1>
    <P>Purged.</P>
    <H3>Guru Meditation:</H3>
    <P>XID: 326200233</P>
    <I><A href="http://varnish.linpro.no/">Varnish</A></I>
  </BODY>
</HTML>

I get the same result if i try to purge another url like this:

PURGE /somefolder/somearticle.ece HTTP/1.0
Host: www.somedomain.no

The domainnames and url's have been changed to hide the sites identity

-- 

Thomas Westlund
Aftenposten AS, UNIX/nettverksavd.
Postboks 1, 0051 Oslo
Tlf: +47 98 20 30 33
Fax: +47 22 86 40 74



More information about the varnish-misc mailing list