AWStats reads the raw Apache logfiles and parses them to give you detailed information about visitors.
/usr/local/awstats
/var/lib/awstats
to store the data./usr/local/awstats/tools/awstats_configure.pl
to setup initial configuration.awstats
HTML directory./tools/awstats_configure.pl
Ubuntu:
> /etc/apache2/httpd.conf > y > domain.com > [Enter for default]
Creates file /etc/awstats/awstats.domain.com.conf
Update stats:
/usr/local/awstats/wwwroot/cgi-bin/awstats_updateall.pl now
Copy /usr/local/awstats/webroot to wherever the awstats docs are viewable.
Alias /awstats "/var/www/localhost/htdocs/awstats" <Directory "/var/www/localhost/htdocs/awstats"> AllowOverride None Options None Order deny,allow Deny from all Allow from 173.165.130.129 Allow from 127.0.0.1 </Directory>
On some CentOS installations, with CPanel installed, you'll need to edit a specific file to get the AWStats alias working:
/usr/local/apache/conf/includes/post_virtualhost_global.conf
You can use the sample config above, or use the config script to create a new one. Here are some configuration variables you are most likely to want to change:
You will need to run the awstats script to build the stats at least once.
Also, you can setup a cron job to execute it nightly.
/usr/local/awstats/tools/awstats_buildstaticpages.pl -config=dev.beandog.org \ -update -dir=/var/www/localhost/htdocs/awstats &> /dev/null