Rate this page del.icio.us  Digg slashdot StumbleUpon

Tips and tricks: How can I configure squid so that it never caches some web sites?

by the editorial team

Add the following line in /etc/squid/squid.conf:

acl NOCACHEDOMAIN dstdomain www.redhat.com
no_cache deny NOCACHEDOMAIN

It will not cache any content come from the domain www.redhat.com.

In /var/log/squid/access.log, it will show the page from that domain will always get "TCP_MISS" on consecutive visits.

1197363963.721    892 127.0.0.1 TCP_MISS/200 11813 GET http://www.redhat.com/ - DIRECT/209.132.177.50 text/html
1197364100.832    906 127.0.0.1 TCP_MISS/200 11813 GET http://www.redhat.com/ - DIRECT/209.132.177.50 text/html

Red Hat’s customer service and support teams receive technical support questions from users all over the world. Red Hat technicians add the questions and answers to Red Hat Knowledgebase on a daily basis. Access to Red Hat Knowledgebase is free. Every month, Red Hat Magazine offers a preview into the Red Hat Knowledgebase by highlighting some of the most recent entries. The information provided in this article is for your information only. The origin of this information may be internal or external to Red Hat. While Red Hat attempts to verify the validity of this information before it is posted, Red Hat makes no express or implied claims to its validity.

6 responses to “Tips and tricks: How can I configure squid so that it never caches some web sites?”

  1. ganesh says:

    i want to know how to configure squid in redhat linux so pls give me suggestion how to configure it

    -Ganesh.n.bonal

  2. ongola boy says:

    Hello ganesh, there are many ways to get help. If you already have squid installed in your distribution, you can at least:
    -check in the folder /usr/share/doc/squid-version-number/
    -use the man page; on a terminal type: man squid
    - there are some nice articles wrote in this redhat magazine about squid, check the archives
    - use the official website www.squid-cache.org and its wiki http://wiki.squid-cache.org/
    -…
    But i should say that even in the config file /etc/squid/squid.conf is very well documented. ;)

  3. Nagaraj .N says:

    i configured squid in red hat linux 5 but it is not working…
    so i want configuration steps… can you help me… please…

  4. Mohan says:

    how to configured proxy server on red hat 5 thru brodband connection, i have bsnl brodand connection and thru that i am giving connection to 8 port switch i need to know more idea for that.

    pl reply

    Mohan

  5. Priscilla Nirmalraj says:

    Specify what configuration changes you have made in squid.conf. I will try to help you

    Priscilla Nirmalraj

  6. Jagbir says:

    I have configured the same to stop caching one of website, say example.com and all its subdomains etc. but still many users complaining for not able to view latest contents.

    acl nocachedomains dstdomain .example.com
    no_cache deny nocachedomains

    Kindly suggest as how to make sure, no items from a website will be cached.
    Thanks

Leave a reply