AWStats

AWStats is a traffic analysis program written in Perl. It can generate really nice charts for your reporting purpose. This is accessed in any web browser; e.g.:

http://www.xxx.yyy/awstats/awstats.pl?config=www.xxx.yyy

Basically you append the “/awstats/awstats.pl?config=www.xxx.yyy” portion to the URL. Of course, before this the AWStats installer would have modified the Apache config file (httpd.conf) to add some directives for AWStats.

It is also good to setup a cronjob for the updating of stats, so the values presented are near-live.

Config files are typically found in /etc/awstats.

# pwd
/etc/awstats
# ls
awstats.www.xxx.yyy.conf
data

The data folder is to be left alone. I suppose it stores AWStats-specific values. To create a new site, copy the example config file and modify AT LEAST the parameters:

LogFile="/var/www/html/www.xxx.yyy/logs/access_log"
LogType=W
LogFormat=4
SiteDomain="www.xxx.yyy"
HostAliases="xxx.yyy"

Here I’m assuming that file requests to the path specified in LogFile, with the Apache directive:

CustomLog /var/www/html/www.xxx.yyy/logs/access_log common

So requests are saved here, and then AWStats will analyze it.

Note: its best to use a separate log for each site, esp on a shared hosting server, otherwise AWStats will have some complaints.

After that, you can save the file, and run:

# perl /usr/local/awstats/tools/awstats_updateall.pl now

This will update the statistics for all AWStats sites.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s