RE: [squid-users] Purge utils

From: Chris Robertson <[email protected]>
Date: Tue, 16 Nov 2004 10:29:54 -0900

As far as I am aware (and I may be wrong) Squid's purge method does not have
the ability to do "fuzzy" purging. If you want to purge
http://my.domain.com/page2.html from the cache, then you have to run
"squidclient -m PURGE http://my.domain.com/page2.html". You can't purge all
the cached pages from a site in one fell swoop using the default tools.

Chris

-----Original Message-----
From: Kvetch [mailto:kvetch@gmail.com]
Sent: Tuesday, November 16, 2004 10:14 AM
To: Emilio Casbas; squid-users@squid-cache.org
Subject: Re: [squid-users] Purge utils

Thanks Emilio, I had my acl wrong but after I corrected it I see
TCP_MISS:NONE in the access log when I do the following
# squidclient -m PURGE http://my.domain.com
HTTP/1.0 404 Not Found
Server: squid/2.5.STABLE3
Mime-Version: 1.0
Date: Tue, 16 Nov 2004 18:44:51 GMT
Content-Length: 0
X-Cache: MISS from squid1.mediageneral.net
Proxy-Connection: close

I can see in the access logs that http://my.domain.com/page2.html is
cached because it brings up a TCP_HIT:NONE in the access log. If I
try to purge everything containing the word page2 or the word domain
in the URL I get the following in my logs NONE:NONE
# squidclient -m PURGE page2
HTTP/1.0 400 Bad Request
Server: squid/2.5.STABLE3
Mime-Version: 1.0
Date: Tue, 16 Nov 2004 18:42:52 GMT
Content-Type: text/html
Content-Length: 1216
Expires: Tue, 16 Nov 2004 18:42:52 GMT
X-Squid-Error: ERR_INVALID_URL 0
X-Cache: MISS from squid1.mediageneral.net
Proxy-Connection: close

Below is my squid.conf file. I would appreciate any help.

Thanks again,
Nick

http_port 3128
http_port 123.456.78.9:80
httpd_accel_host host1.mydomain.net
httpd_accel_port 80
redirect_program /usr/local/squirm/bin/squirm
redirect_children 10
httpd_accel_host virtual
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
hosts_file /etc/hosts
visible_hostname squid1.mydomain.net
cache_effective_user squid
cache_effective_group squid
acl my_dests dst 123.456.78.9
acl http protocol http
acl port80 port 80
acl dynamic url_regex -i db_user_name clipboard apkr debug
data_entry\/forge data_entry\/ptemp
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl cachemancgi src 192.168.1.239
acl localhost src 127.0.0.1/255.255.255.255
acl mysquidhost src 123.456.78.9
acl Safe_ports port 80 # http
acl CONNECT method CONNECT
acl HEAD method HEAD
acl purge method purge
### apps is a redirect IP to my_addr ####
acl apps src 192.168.1.239
acl my_addr src 192.168.2.57
acl src_local src 127.0.0.0/8
acl bad_paths urlpath_regex -i \.exe\?
acl bad_paths urlpath_regex -i \.dll\?
acl bad_paths urlpath_regex -i \/winnt\/system32\/
acl bad_paths urlpath_regex -i \/_vti_bin\/
acl bad_paths urlpath_regex -i \/scripts\/
acl bad_paths urlpath_regex -i \/perl\/
acl bad_paths urlpath_regex -i \/examples\/
acl bad_paths urlpath_regex -i \/manual\/
acl bad_paths urlpath_regex -i \.pl\?
acl bad_paths urlpath_regex -i \.ida\?
acl bad_paths urlpath_regex -i \.php\?
acl bad_paths urlpath_regex -i \.cgi\?
acl bad_paths urlpath_regex -i \/counter
# list known bad guys here (site scrapers, spiders, etc)
acl spiders src 216.217.29.79 63.148.99.241 209.73.228.0 4.41.181.38
67.216.62.31
icp_access allow all
http_access allow manager localhost
http_access allow manager apps
http_access allow manager cachemancgi
http_access allow purge src_local
http_access deny manager
http_access deny purge
http_access deny !Safe_ports
http_access allow HEAD
http_access allow purge localhost
http_access allow purge mysquidhost
http_access allow purge my_addr
http_access allow purge my_dests
http_access deny purge
http_access deny spiders
http_access deny bad_paths
http_access allow http port80 my_dests
http_access deny all
#
cache_mem 150 MB
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /u02/squid 12288 16 256
maximum_object_size_in_memory 200 KB
request_body_max_size 2500 KB
cachemgr_passwd secret info stats/objects
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
#cache_store_log none
shutdown_lifetime 10 seconds
#
no_cache deny dynamic
cache_mgr support@mydomain.net
#
refresh_pattern . 14400 100% 14450 ignore-reload
override-expire
emulate_httpd_log on
strip_query_terms off
#log_mime_hdrs on
coredump_dir /u02/squid

On Tue, 16 Nov 2004 17:37:07 +0100, Emilio Casbas <ecasbas@unav.es> wrote:
> Kvetch wrote:
>
>
>
> >./purge -c "/etc/squid/squid.conf" -p 123.123.123.12:80 -e se "page2"
> >I see in my logs a PURGE on this page but I get a TCP_DENIED:NONE. If
> >I view page2 after the Purge was issued I see the logs report a
> >TCP_HIT:NONE, meaning it is still in cache. Wouldn't I get a
> >TCP_MISS:DIRECT if it was purged from cache.
> >
> >Does anyone know the correct way to do this type of purging or know of
> >any utilities that can help me?
> >
> >Thanks,
> >Nick
> >
> >
> >
>
> You have to configure the acl for these host
> can purgue in your squid proxy.
>
> see;
> http://www.squid-cache.org/Doc/FAQ/FAQ-7.html#ss7.5
>
> Emilio C.
>
Received on Tue Nov 16 2004 - 12:29:58 MST

This archive was generated by hypermail pre-2.1.9 : Wed Dec 01 2004 - 12:00:01 MST