Syed Jahanzaib Personnel Blog to Share Knowledge !

January 23, 2012

SQUID: Howto Exclude some sites & Exntension from CACHING

Howto Exclude Few Sites from Caching

If you are using SQUID proxy server and you don’t want to cache few sites , use the following directives,

acl NO-CACHE-SITES dstdomain "/etc/squid/not-to-cache-sites.txt"
no_cache deny NO-CACHE-SITES

Now create the file which will contains our sites list which we don’t want to cache.

touch /etc/squid/not-to-cache-sites.txt

and add  your desired web sites name in /etc/squid/not-to-cache-sites.txt
For example
nano /etc/squid/not-to-cache-sites.txt
and add following or your entries

bankalhabib.com
aacable.wordpress.com
wordpress.com
nae.com.pk
jang.com.pk

Now we have to reload squid.conf so changes may apply by following command

squid -k rec
OR
squid -k reconfigure

Howto Exclude Specific Extension from Caching

Similarly if you don’t want to cache *.FLV files , use the following directives

hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \? \.flv
no_cache deny QUERY


Now we have to reload squid.conf so changes may apply by following command

squid -k rec
OR
squid -k reconfigure
Regard's
Syed Jahanzaib

Advertisement

1 Comment »

  1. your website has very good material! congratulations!

    Comment by m4sk4r4 — January 23, 2012 @ 3:37 PM


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Theme: Silver is the New Black. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 142 other followers