Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am using Varnish 3.0.3

Presently I know how to purge single URLs using this VCL:

if (req.request == "PURGE") {
  if (!client.ip ~ purge) {
      error 405 "Not allowed";
  }
  return(lookup);
  error 200 "Purged";
}

I would like to issue a wildcard purge, such as:

PURGE: http://www.mysite.com/images/*

Does Varnish support this?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Using telnet:

telnet serverip 6082
purge req.url == "/images/"
share|improve this answer
    
Although I would have preferred an HTTP approach, this did work well. Thanks Paul. I wound up using varnishadm instead of telnet because our servers require authentication. –  Gil Hildebrand Nov 1 '12 at 0:47
    
Hello, please try: varnishadm -T host:6082 purge req.url == "/images/" –  Paul Nov 1 '12 at 4:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.