Written by James McDonald

August 10, 2009

Update: I kept getting ACCESS_DENIED and “>Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect. ERR_ACCESS_DENIED”

I added

cache_mgr [email protected]
cachemgr_passwd mysecretpassword

acl PURGE method PURGE
acl mylocal src 127.0.0.1
acl purgehost src 192.168.0.109
acl purgelocal src 192.168.0.53
http_access allow PURGE purgehost
http_access allow PURGE mylocal
http_access allow PURGE purgelocal

# this ran squidclient specifying -h and -u 
squidclient -u [email protected] -m PURGE -h 192.168.0.53 http://www.example.com/cakephp/

 

Original Post

Sometimes Squid can hold onto a bad file and your clients keep getting a bad copy of a webpage when the issue has been resolved.

So you may want to remove the bad page reference in the squid cache without going to the extreme of deleting the whole cache and restarting squid

To get PURGE working put this is squid.conf

acl PURGE method PURGE
# the example on squid-cache.org had acl localhost src 127.0.0.1 but 
# reloading squid caused it to complain so I changed localhost host to something else
# in this cas mylocal
acl mylocal src 127.0.0.1
http_access allow PURGE mylocal
http_access deny PURGE

and then use squidclient on the squid box to run the purge…

[root@ahostofmine ~]# squidclient -m PURGE https://toggen.com.au/
HTTP/1.0 200 OK
Server: squid
Date: Mon, 10 Aug 2009 06:39:56 GMT
Content-Length: 0

[root@ahostofmine ~]# squidclient -m PURGE https://toggen.com.au/
HTTP/1.0 404 Not Found
Server: squid
Date: Mon, 10 Aug 2009 06:39:58 GMT
Content-Length: 0

Here is the link to the www.squid-cache.org PURGE documentation

1 Comment

  1. Efstathios

    Its working, thank you.
    But how i can do squid server to response in both http – https?

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

Network speed test host to host

On Ubuntu / Debian apt-get install iperf3 On Windows download it from https://iperf.fr/iperf-download.php#windows Make...

Clear HSTS Settings in CHrome

Open chrome://net-internals/#hsts enter the domain in the query field and click Query to confirm it has HSTS settings...