Unable to purge using CURL on VARNISH

Puneet puneet.arora at insticator.com
Thu May 23 19:06:42 CEST 2013


Hi All,

I am unable to purge objects in varnish using CURL

CURL command: curl -X PURGE localhost/public/stylesheets/main.css -v the 
curl command is returning 200 OK response. the object is not getting purged

config file in VARNISH : default.vcl

     sub vcl_miss {
         if (req.request == "PURGE") {
             purge;
             error 404 "Not in cache.";
         }
         if (req.http.user-agent ~ "spider") {
             error 503 "Not presently in cache";
         }
         return (fetch);
     }

     sub vcl_hit {
         if (req.request == "PURGE") {
             purge;
             error 200 "Purged.";
         }
         return (deliver);
     }

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

Kindly, help on this

Thanks
Puneet

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20130523/8b6df22d/attachment.html>


More information about the varnish-misc mailing list