Awstats on Debian for Website Trackking
Website traffic trackking is one of the most important tasks for webmaster, hosting company and the related peoples to know the traffic pattern, bandwidth utilization, access information as well as others. Awstats and Webalizer are two common and widely uses software for this purpose. Here i have described configuration of Awstats on Debian.
1) Download the awstats for debian
apt-get install awstats
Two new directory will exists after the installation
– /etc/awstats = configuration directory
Create a directory awstats under /usr/local and copy all the files from /usr/share/doc/awstats/examples to /usr/local/awstats.
As well as create the folder wwwroot/cgi-bin and copy awstats.model.conf to here.
Now run awstats_configure.pl. It will ask for the location of apache configuration file, domain name and other stuffs. Fill accordingly.
Add this on aliases sections to view images of awstats.
Alias /awstats-icon/ /usr/share/awstats/icon/
Allow from all
Now edit /etc/awstats.conf file to change the location of log file and domain name.
Change the permission of log file of access.log under /var/log/httpd/access.log by issuing
chmod o+r access.log
Now issue a command /usr/lib/cgi-bin/awstats.pl -config=awstats.full-domain-name.conf
Entry the following command in crontab
3,33 * * * * www-data [ -x /usr/lib/cgi-bin/awstats.pl -a -f /etc/awstats/awstats.conf -a -r /var/log/apache/access.log ] && /usr/lib/cgi-bin/awstats.pl -config=full-domain-name -update >/dev/null
Now its works.
check on http://ip of the server/cgi-bin/awstats.pl?config=fully-qualified-domainname