Debian 13 trixie

Squid : Log Report : SARG2025/09/22

 

Install SARG (Squid Analysis Report Generator) to generate Squid Log Report.

[1]

Install Apache2, refer to here.

[2] Install and Configure SARG.
root@prox:~#
apt -y install sarg
root@prox:~#
vi /etc/sarg/sarg.conf
# line 45 : uncomment and set font size
font_size 12px

# line   : uncomment and set header font size
header_font_size 16px

# line 55 : uncomment and set title font size
title_font_size 16px

# line 120,121 : change like follows
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 like to exclude from log reports

127.0.0.1
www.exmaple.domainname
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 reload apache2
# generate log reports

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

[3] Access to [(you servers 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