Ubuntu 18.04
Sponsored Link

Squid : Log Report : SARG2018/05/15

 
Install SARG (Squid Analysis Report Generator) to generate Squid Log Report.
[1] Install and Configure SARG.
root@prox:~#
apt -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:
  systemctl reload apache2

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 [http://(hostname or IP address)/squid-reports/] with Web Browser on a Client Computer, then Squid Log Reports site is shown and it's possible to Proxy statics.
Matched Content