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
and moved that file to the appropriate directory, we need to restart or reload the Apache Web server using the following command:
$ apachectl graceful
To learn more about configuring Apache, please check: http://httpd.apache.org...