How to install awstats on CentOS 5.2

Posted by Martin Perron on Jan 26, 2009 in HowTo - Linux4 comments

aswstats is very usefull if you’re running an apache server and want to collect statistic about your webserver. Here’s the info on how to install and configure it on CentOS 5.2

Install it with yum (needs rpmforge repo -> http://geekzine.org/2009/01/26/how-to-add-rpmforge-repository-to-centos-52/):

yum install awstats

Now you need to configure the apache permissions:

vi /etc/httpd/conf.d/awstats.conf

You can configure your allow from like this:

allow from 192.168.

Save the file

Then, reload apache config:

/etc/init.d/httpd reload

You need to create a default config for awstats

cd /etc/awstats

cp awstats.model.conf awstats.conf

You can edit the HostAliases Line to put your server name.

HostAliases=”localhost 127.0.0.1″

also, edit the line SiteDomain to full machine name:

SiteDomain=”webserver.example.com”

The  default configuration is now done!

Now you can access your stats on:

http://IpofTheMachine/awstats/awstats.pl

  • Share/Save/Bookmark

4 comments

» Comments RSS Feed
  1. Kudos!

  2. [...] geekzine.org [...]

  3. [...] [...]

  4. This didn’t work for me!

    Forbidden

    You don’t have permission to access /awstats/awstats.pl on this server.
    Apache/2.2.3 (CentOS) Server at **.**.**.** Port 80

Leave a comment