SARG: Instalasi

From OnnoWiki
Jump to navigation Jump to search

sumber: https://www.server-world.info/en/note?os=Ubuntu_16.04&p=squid&f=8


apt-get -y install sarg
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


vi /etc/sarg/exclude_hosts
# write hosts you'd like to exclude from log reports
127.0.0.1
www.google.co.jp
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>


mkdir /var/www/html/squid-reports
a2enconf sarg
service apache2 reload
systemctl restart apache2
# generate log reports
/usr/bin/sarg
# reports are generated daily by /etc/cron.daily/sarg


Referensi