# contrib/EL6/README
This is sample configuration files to drive an Apache 2.2 instance for 
SquidGuard Manager on RHEL/CentOS 6.x and 5.x.  Many files were borrowed
from CentOS 6 distribution.

As you may already know, httpd has to be run under user/group 'squid' to
hold SquidGuard Manager. Most of the time, the effective uid/gid of the
main default httpd is 'apache'. In this way, you are able to run a
dedicated httpd process for SquidGuard Manager keeping the default httpd
configurations intact.

Note also that httpd in this sample binds to TCP port other than 80 (3128
actually). Thus main httpd could be run simultaneously. Be careful, as 3128
is the default port of squid cache, you may need to change that of either
this httpd or squid cache daemon.

# Structure

/etc/httpd/                -- This is ServerRoot of the httpd daemon.
    \_ conf/
        squidguardmgr.conf -- Apache configuration file.
        .htpasswd          -- Optional but recommended. See note.
    \_ conf.d/
        squidguardmgr.cf   -- Directory and Alias settings for SquidGuard 
                              Manager WWWDIR
        perl.conf          -- May be provided by distribution's mod_perl pkg.
/etc/sysconfig/
    squidguardmgr          -- httpd runtime options read by init-file below.
                              On EL5, you must change PIDFILE variable to
                              /var/run/squidguardmgr.pid for proper operation.
/etc/init.d/
    squidguardmgr          -- Init file for httpd driving SquidGuard Manager. 
                              Rename rc_squidguardmgr file and set permission
                              root:root 755.
/var/www/
    \_ squid-gui/          -- This is httpd's DocumentRoot. Can be empty.
    \_ sgmgr/              -- WWWDIR = CGIDIR of SquidGuard Manager, automatically
                              made through installation of SquidGuard Manager if
                              you give proper arguments to Makefile.PL.
/var/log/httpd/
    \_ squidguardmgr/      -- httpd's log directory.
/etc/logrotate.d/
    squidguardmgr          -- logrotate configuration file.

Note:
You don't need to permit 'squid' account read nor write access to these files
except for the contents subtree (/var/www/sgmgr and squid-gui).
If you want (maybe you do want) to authenticate user to access SquidGuard Manager
Web GUI, generate .htpasswd file using htpasswd command, then look into the 
commented-out lines in squidguardmgr.cf.
Enjoy ;-)
