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 ...

Get Squid Proxy Server 3.1 Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.