Configure awstats for zeus


Install and configure awstats on a zeus webserver.

Install awstats

Download and extract awstats to /usr/local

Rename extracted directory to awstats

Configure awstats

Copy the default configuration file awstats/wwwroot/cgi-bin/awstats.model.conf to /etc/awstats/. Rename this file by replacing ‘model’ with your website name, ie

Open this file and edit the following:

HostAliases=" localhost"

Move the DirData from the awstats directory to your site log directory:

mv awstats/DirData /export/web/mysite/logs/awstatsDirData

Modify the /etc/awstats configuration file with new location:


Configure awstats_misc_tracker.js

Enabling the javascript code to run will track useful things about a client like screen resolution, and browser plugins.

Add the following to the head element your root index web page:

Modify the config script:


Configure Geographical Tracking

Install the Geo::IPfree perl module using cpan:

install Geo::IPfree

Modify the config script:


Configure zeus logging

Make sure the log format is NCSA Combined

Configure zeus cgi

You must create a directory alias for the awstats cgi-bin:

Requests for…
Are mapped to…

Configure zeus url mappings

There are several aliases required for awstats directories:

Requests for…Are mapped to…

/awstats/ /usr/local/awstats/wwwroot/
/stats/ /usr/local/awstats/wwwroot/
/icon/ /usr/local/awstats/wwwroot/icon/

Add awstats in cron

#run awstats hourly
0 * * * * /usr/local/awstats/wwwroot/cgi-bin/

Import log files into awstats

To import log files, each log file must be imported chronologically. If not, the stats for the month will be inaccurate: -LogFile=/export/web/docs/logs/