Ubuntu 14.04
Sponsored Link

Access Log Report : AWstats2016/01/31

 
Install AWstats which reports http logs for analyzing accesses to Apache http server.
[1] Install AWstats.
root@www:~#
apt-get -y install awstats
root@www:~#
vi /etc/awstats/awstats.conf
# line 123: 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 154: specify 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
# change access persmission for all "Allow from" line

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:~#
/etc/init.d/apache2 restart

* Restarting web server apache2
...done.
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 name or IP address/)/cgi-bin/awstats.pl", then follwing screen is shown and it's possible to see httpd log reports.
Matched Content