AWStats on Ubuntu Server

Since I am running this blog on my own server, I decided I should probably set up some log parsing. My personal website is hosted by Nearly Free Speech, and they provide AWStats for statistics. Another site I administer is hosted by DreamHost. DreamHost provides Analog web statistics. After playing with both, I decided to use AWStats.

Ubuntu Tutorials has provided a nice tutorial about setting up AWStats on Ubuntu. I configured my sites individually with no default site in the following files:

/etc/awstats/awstats.blog.lundscape.com.conf
/etc/awstats/awstats.claude.zacintosh.com.conf
/etc/awstats/awstats.wiki.lundscape.com.conf

This means that browsing to “http://domain.tld/awstats/awstats.pl” as they suggest won’t work. Instead, I append the site to the end of the string like this: “http://domain.tld/awstats/awstats.pl?config=blog.lundscape.com”.

Also, rather than adding entries to my crontab, I simply added a script to my “/etc/cron.hourly”:

#! /bin/bash

/usr/lib/cgi-bin/awstats.pl -config=blog.lundscape.com \
	-update > /dev/null 2>&1
/usr/lib/cgi-bin/awstats.pl -config=claude.zacintosh.com \
	-update > /dev/null 2>&1
/usr/lib/cgi-bin/awstats.pl -config=wiki.lundscape.com \
	-update > /dev/null 2>&1

This automatically updates my AWStats every hour whether I view my statistics in a web browser or not.