AWstats CentOS rpmforge

October 8, 2008 – 17:15

Setup and configuration of AWstats from rpmforge on CentOS.

Install awstats package:

yum install awstats

install Perl GeoIP to get country info

yum install perl-Geo-IPfree

Setup awstats config file:

cp /etc/awstats/awstats.model.conf /etc/awstats/awstats.www.domain.tld.conf

vi /etc/awstats/awstats.www.domain.tld.conf

edit at least the following lines:

LogFile=”/var/log/httpd/access_log”

SiteDomain=”localhost.localdomain”

LoadPlugin=”geoipfree” (uncomment)

and set them to the appropriate files

Run awstats_updateall

/usr/bin/awstats_updateall.pl now -awstatsprog=/var/www/awstats/awstats.pl

and add to cron

crontab -e

0 * * * * /usr/bin/awstats_updateall.pl now -awstatsprog=/var/www/awstats/awstats.pl

Edit /etc/httpd/conf.d/awstats.conf

add DMZ to allowed hosts:

allow from 127.0.0.1 192.168.168.0/24

service httpd configtest

service httpd reload

Sorry, comments for this entry are closed at this time.