On an old system, I used Webalizer to analyze Apache log files. On a newer system I thought I'd give awstats a try. I had two options, install via the original source, or install via apt-get. Considering the number of files and directories involved, I decided to go with the Debian package manager to install awstats.
The package manager to get things into decent directories, but it appears to have
been built for an earlier flavour of Debian. A few things I had to fix up for working in
Debian Lenny 5.0.1 with Apache v2.0 include:
- In /etc/cron.d/awstats, changing one of the file checks from /var/log/apache/access.log to /var/log/apache2/access.log
- changing the ownership of the logs in /var/log/apache from root.adm to root.www-data (an alternative might be www-data.adm)
- changing the creation ownership in /etc/logrotate.d/apache2 from 'create 640 root adm' to 'create 640 root www-data'
- in /etc/awstats/awstats.conf.loal, added 'LogFormat=1' and 'DirIcons=/awstats/icon'
- in /etc/apache2/sites-enabled/000-default, added 'Alias /awstats/icon "/usr/share/awstats/icon"'
- the version of awstats installed was 6.5. I downloaded the awstats.pl file from awstats site and
placed it in the /usr/lib/cgi-bin directly as a simple upgrade to v6.9.
During package installation, the package manager suggested some additional packages: libnet-dns-perl libnet-ip-perl libgeo-ipfree-perl. Perhaps
when I get a chance, I'll install those and see what they add to the statistics management.