Webalizer is used to read through Apache Logs and generate incremental statistics and reports. All it requires is read access to Apache logs. Webalizer must be run JUST BEFORE Apache rotates its own logs, otherwise gaps will be missing in reports. The reports are useful for showing the number of unique visitors to a particular website/vhost, the bandwith used and the referers to a website.
It has been found through experience that bots can find where webalizer is running and inject referrers into logs & reports. Two options can be used: either disable listing the referrers or to put a .htaccess file in place to protect webalizer from been identified.
apt-get install webalizer
This installs webalizer (no real install process - just copies files into strategic places).
- A default webalizer.conf is placed in /etc/webalizer.conf
- A default crontab is installed in /etc/cron.daily/webalizer.conf
- Executable files are placed at: /usr/bin/webalizer
Key lines in webalizer.conf for vhost with seperate Apache Log files:
LogFile /var/log/apache2/access_vhost.log OutputDir /var/www/vhost Incremental yes ReportTitle Usage Statistics for vhost.kartbuilding.net HostName www.kartbuilding.net (affixes this to report info & URL links) Quiet yes (eliminates crontab emails) HideSite *www.kartbuilding.net* HideReferrer *www.kartbuilding.net* HideReferrer Direct Request
Key Lines in webalizer.conf for shared hosting:
LogFile /var/log/apache2/access.log LogType clf OutputDir /home/user/logs ReportTitle Usage Statistics for User HostName www.server.com IgnoreURL * IncludeURL /user*