Ubuntu 16.04
Sponsored Link

Squid Log Report : SARG2016/06/12

 
Install SARG (Squid Analysis Report Generator) to generate Squid Log Report.
[1] Install and Configure SARG.
root@prox:~#
apt-get -y install sarg
root@prox:~#
vi /etc/sarg/sarg.conf
# line 120,121: uncomment and comment out

output_dir /var/www/html/squid-reports
#
output_dir /var/lib/sarg
# line 132: add

resolve_ip
yes
# line 377: change

charset
UTF-8
root@prox:~#
vi /etc/sarg/exclude_hosts
# write hosts you'd like to exclude from log reports

127.0.0.1
www.google.co.jp
root@prox:~#
vi /etc/apache2/conf-available/sarg.conf
# create new

<Directory "/var/www/html/squid-reports">
   
# add access permission

    Require local
    Require ip 10.0.0.0/24
</Directory>
root@prox:~#
mkdir /var/www/html/squid-reports

root@prox:~#
a2enconf sarg

Enabling conf sarg.
To activate the new configuration, you need to run:
service apache2 reload
root@prox:~#
systemctl restart apache2
# generate log reports

root@prox:~#
/usr/bin/sarg
# reports are generated daily by /etc/cron.daily/sarg

[2] Access to the "http://(server's hostname or IP address)/squid-reports/". it's Ok if following Squid report site is shown normally.
Matched Content