Ubuntu 16.04
Sponsored Link

Access Log Report : AWstats2016/06/15

 
Install AWstats which reports http logs for analyzing accesses to Apache http server.
[1] Install and Configure AWstats.
root@www:~#
apt-get -y install awstats
root@www:~#
vi /etc/awstats/awstats.conf
# line 122: change

# if your config for log format in httpd.conf is 'combined' Set here '1'

# if log-config is 'common' set here '4', but in this case, some informations can't be get (browser info and so on)

LogFormat=
1
# line 153: change to your hostname

SiteDomain="
www.srv.world
"
# line 168: set IP address you'd like to exclude

HostAliases="
localhost 127.0.0.1 REGEX[server\.world$] REGEX[^10\.0\.0\.]
"
root@www:~#
cp /usr/share/doc/awstats/examples/apache.conf /etc/apache2/conf-available/awstats.conf

root@www:~#
vi /etc/apache2/conf-available/awstats.conf
# add access permission

Allow from 10.0.0.0/24
# end line: comment out

#
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
root@www:~#
a2enconf awstats serve-cgi-bin

Enabling conf awstats.
Enabling conf serve-cgi-bin.
To activate the new configuration, you need to run:
service apache2 reload
root@www:~#
systemctl restart apache2
root@www:~#
sed -i -e "s/www-data/root/g" /etc/cron.d/awstats

# generate reports manually ( update it by Cron every 10 minutes )

root@www:~#
/usr/share/awstats/tools/update.sh

[2] Access to "http://(your server's hostname or IP address/)/cgi-bin/awstats.pl", then follwing screen is shown and it's possible to see Apache log reports.
Matched Content