install debian-packaged awstats

Notes on installing and using debian-packaged AWStats to analyze Apache logs.

Install debian packaged awstats ( now v7.0 )
# apt-get install awstats

I would use the following setup in apache2 installations with site(s) or virtual host(s) that belong to the same person-organization and I would NOT use it in a shared hosting environment.

Get the apache configuration file.
# wget -O /etc/apache2/conf.d/awstats.conf

Restart Apache.
# /etc/init.d/apache2 restart

Enable ipduh_intel awstats plugin and disable PTR lookups.
# wget -O /etc/awstats/awstats.conf.local
IP numbers relay much more information than PTR names and PTR names can be (and commonly are) abused-manipulated.

Install the ipduh_intel awstats plugin.
# wget -O /usr/share/awstats/plugins/

Create the apache password file and add the user 'user' with password 'userpass'
# htpasswd -cb /etc/awstats/A2Passwords user userpass
Add the user 'user2' with password 'user2pass' to the apache passwords file
# htpasswd -b /etc/awstats/A2Passwords user2 user2pass

Create an awstats configuration file for each (virtual) host in /etc/awstats. The configuration files should have the form e.g. for a host named the configuration file would be and it could look like the following.
Include "/etc/awstats/awstats.conf"

Analyze for first time the access logs of one host.
# cat /logs/sites/* >> /logs/sites/
# /usr/lib/cgi-bin/ --configdir=/etc/awstats/

View the awstats analysis with a web browser at

Get rid of debian package cronjob
# rm /etc/cron.d/awstats

Install debian packaged awstats