News | Installation | Configuration | Download | Support | License | Screenshot
Help support
SquidGuard Manager!

Requirement

SquidGuard Manager may run on any Unix like OS with any modern Perl installation using the perl CGI module. It must be run on a proxy server hosting squidGuard.

You need to run this CGI script using Apache HTTP server and the httpd daemon must run be run as uid and gid holding SquidGuard (most of the time this is squid cache effective user/group). This is to allow SquidGuard Manager to read and write into the configuration files to manage blocklists and acls. If you use SquidClamav, it must also be run under the same user.

SquidGuard Manager use some system commands to manage blocklists and log files. Your system must have the following binariesi installed: diff, grep, find, rm and tail.

Installation

To install SquidGuard Manager you must be root as you need to set specials grants on the filesystem.

Prepare your system

SquidGuard Manager need to have read/write access onto SquidGuard configuration file and the dbhome directory. It also must have read access onto the log file. If you use the SquidClamav Manager GUI it also need read/write access on the squidclamav.conf file as well as the log file.

For that SquidGuard Manager must be run as the user under which squidguard and squidclamav are run. Most of the time this is the Squid cache effective user.

	chown -R squid:squid /usr/local/squidGuard
	or
	chown -R squid:squid /etc/squidguard.conf /var/lib/squidguard

To allow httpd to run squidguardmgr.cgi as a different user or group you must edit your httpd.conf file and change the User/Group directive to the user and group running Squid.

IMPORTANT: SquidGuard Manager do not support symbolic link into the SquidGuard dbhome directory. You need to remove these symbolic links from your system and modify your squidguard.conf file to replace them by the directories real names.

Automatic installation

Execute the install script and answer to the questions as follow:

    perl Makefile.PL
    make && make install

By default it will install all files into /var/www/squidguardmgr/ and give you a configuration sample to include in your httpd.conf. After that restart your httpd server and take a look at http://my.proxy.dom/squidguardmgr/

You can fully customize this installation by using the following variables:

	CONFFILE => Where is the SquidGuard configuration file
	DBHOME => Where is the SquidGuard DB directory
	LOGDIR => Where is the SquidGuard log directory
	WWWDIR => SquidGuard Manager base directory installation
	CGIDIR => Where to install CGI: WWWDIR/CGIDIR. Default: WWWDIR
	HTMLDIR =>  Where to install css,js and images files: WWWDIR/HTMLDIR. Default: WWWDIR
	LANGDIR => Translation directory to use (en_US or fr_FR). Default: en_US
	BASEURL => Base url where css,js and images files will be found. Default: /squidguardmgr
	SQUIDUSR => User running Squid
	SQUIDGRP => Group running Squid
        SQUIDCLAMAV => Path to squidclamav binary (v5.x only)
	CICAP_SOCKET => c-icap server control socket (v6.x only)
	SQUIDCLAMAVCONF => Path to squidclamav.conf file

For packaging there's two more configuration variables:

	DESTDIR => Directory prefix wher install will be done
	QUIET => Do not display the post install message

Example:

	perl Makefile.PL CONFFILE=/usr/local/etc/squidguard.conf \
	DBHOME=/usr/local/squidguard/database \
	LOGDIR=/usr/local/logs/squidguard \
	WWWDIR=/usr/local/apache CGIDIR=cgi-bin/admin HTMLDIR=htdocs/admin \
	LANGDIR=fr_FR BASEURL=/admin/ SQUIDUSR=squid SQUIDGRP=squid

	make && make install

This will install SquidGuard Manager CGI squidguardmgr.cgi, squidguardmgr.conf, squid_wrapper and all language files under /usr/local/apache/cgi-bin/admin/. All SquidGuard Manager css, js and images files will be copied under the directory /usr/local/apache/htdocs/admin/. Squidguard Manager will expect to find the SquidGuard configuration file at /usr/local/etc/squidguard.conf and the log and SquidGuard databases respectively at /usr/local/logs/squidguard and /usr/local/squidguard/database. All installed files will be owned by the squid user and squid group. The squid wrapper (use to reconfigure squid after change) will be setuid as root user.

Manual installation

Copy all files from the cgi-bin repository into the CGI script directory of your choice. Check that squidguardmgr.cgi can be executable by your Apache server and chown the entire directory to the user and group running httpd.

Copy all files from the htdocs repository into your DocumentRoot directory or any other subdirectory and check that they can be read by your httpd server.

Edit the squidguardmgr.conf file into you cgi directory and check that all path are conform to your installation.

If you want to be able to reload Squid redirector from the gui interface after your SquidGuard and/or SquidClamav modification, you must compile and install the squid_wrapper with suid root into the squidguardmgr.cgi repository:

	cd squid_wrapper/
	cc -o /path/squidguardmgr/cgi/squid_wrapper squid_wrapper.c
	chown root.root /path/squidguardmgr/cgi/squid_wrapper
	chmod +s /path/squidguardmgr/cgi/squid_wrapper

Before that you must edit squid_wrapper.c and change the path to squid binary.


Copyright © 2010-2011 Gilles Darold, all rights reserved