AWStats
- February 12th, 2007
- By Wayne Khan
- Write comment
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 commonSo 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 nowThis will update the statistics for all AWStats sites.