Lisa has been wanting better stats than webalizer for a while now, and heard about awstats in a thread on The Usual Suspects. We looked it over, and it does seem to be better. Lisa’s biggest like is that all the links on the ‘full list’ expansion page are live, whereas the expansion pages for webalizer are boring old gray background text — very 1992, and not live.
So I downloaded and went to work. Unfortunately, the docs aren’t very good, and not because they’re written in a French accent, though they are. So herewith, some of the stuff I had to discover for myself.
First, there appears to be no reason to look at the rpm package. It puts itself into /usr/local/awstats. However, you then need to move the program itself into cgi-bin, and put the conf file into /etc or /etc/awstats. By hand. To finish the foolishness, the sample conf file (awstats.model.conf) doesn’t actually seem to be in the rpm. So I ended up downloading the tgz file anyway, to get the conf file. (And yes, you want that sample conf file. It’s 45k of copious comments, and remember the docs are rather grim.)
I knew enough to change the log file name appropriately, but I then got hit up for SiteDomain. Search for it in the conf file. It should the the fully qualified domain name of the server whose stats you’re analyzing. The docs imply that if you name the conf file correctly (awstats.www.granolageek.com.conf), awstats will use that name for log analysis. They lie. As far as I can tell, the stuff between awstats and conf is just an opaque identifier used to locate the right conf file, and you must have your fully qualified domain name in the file.
As of now, I have it updating as a cron job only, with stats readable through the site. Of course there is an update button on the page, but it errors because the cgi-user isn’t allowed to read the log directory. This isn’t an accident, it’s a security precaution.
One more item: you can’t update back in time. You’ll need to build your stats starting from your oldest log file and work forward. If you start with the current file and then try to analyze older ones, it just ignores them all. So now I also have to figure out how to reinitialize the stats. Stay tuned for updates.
1 thought on “Adventures with Awstats”
We have been trying to deploy Awstats on our website:
Corporate Portal Software
Thanks for the help!