Spent the last hour setting up AWStats on my Ubuntu server. What’s annoying is that the package is pre-configured for Apache — I completley understand why this is done, but when you don’t run Apache it is slightly irritating.
Things to note when not running Apache:
Make sure that /var/lib/awstats/ is chmod'ed to permissions that your webserver can read from. Here’s the cron code I used to make sure awstats updates itself every 10 minutes:
0,10,20,30,40,50 * * * * nobody [ -x /path/to/cgi-bin/awstats.pl -a -f /etc/awstats/awstats.conf -a -r /path/to/access.log ] && /path/to/awstats.pl -config=<domain name> -update >/dev/null
My webserver is securely running as nobody so it’s important the we use the same user to perform the cron job to update awstats’ datafile.
As mentioned previous, the important part here is making sure that this cron job can update files within /var/lib/awstats/. A chmod 640 will provide ample security here, allowing the webserver user to read and write, as well as allowing the group to read the file.
That all done, AWStats is now up and running and providing some interesting statistics..! ;)
September 11, 2006



















Sorry, no comments yet.