O'Reilly logo

Squid Proxy Server 3.1 Beginner's Guide by Kulbir Saini

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – configuring Apache to use cachemgr.cgi

To complete this task quickly we need to put the following lines in a file named squid-cachemgr.conf and then move that file to our Apache installation's conf.d directory (which is generally /etc/httpd/conf.d/ or /etc/apache2/conf.d/).

ScriptAlias /Squid/cgi-bin/cachemgr.cgi /opt/squid/libexec/cachemgr.cgi

# Only allow access from localhost by default
<Location /Squid/cgi-bin/cachemgr.cgi>
 order allow,deny
 allow from localhost
 # If we want to allow access to cache manager from 192.0.2.25,
 # uncomment the following line
 # allow from 192.0.2.25
 # Add additional allowed hosts as needed
 # allow from .example.com
</Location>

Once we have copied these lines in to a file called squid-cachemgr.conf ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required