Generating AWStats

The way I maintain my website currently is I have a copy on my laptop that I edit and every so often I run rsync to transfer any changes to the server.

This system generally works pretty well. One of the exceptions has to do with generating server statistics. I am running Fedora and the server is running Debian. The names of directories is different as well as the format and naming convention for the log files. (I use Apache combined whereas the server uses common.)

The other issue with generating statistics is I have asked to have all scripts other than PHP disabled. I have lots of code lying about in the graveyard and as spiders were wandering across it, it was getting executed and getting me in trouble. This is fine, except awstats is a perl script and I'd like to use it.

I don't really care about having up to the minute statistics, just a general idea, so using awstats' offline mode is fine. I would like to have a long term view though, and so I have to do something to save the monthly views.

Unfortunately the way that awstats searches for its configuration is a bit convoluted. The user supplies the hostname which then goes into a filename awstats.hostname.conf which is searched for in a set path. This means that either I need to be running this script in a particular place or I have to do some finagling. I decided to make some symlinks so that awstats would think it was in the same directory as the configuration.

The generate_all is run in a cron job once a day. It works well enough.