Install and configure AWStats on Centos

Assume that you have Apache installed and it is working, you want to apply AWStats to your Centos server.

1. Install AWStats with yum.
yum install awstats
2. Edit the file named /etc/httpd/conf.d/awstats.conf with line below,

Alias /awstats/icon/ /var/www/awstats/icon/

ScriptAlias /awstats/ /var/www/awstats/

        DirectoryIndex awstats.pl
        Options ExecCGI
        order deny,allow
        allow from all

Alias /awstatsclasses "/var/www/awstats/lib/"
Alias /awstats-icon/ "/var/www/awstats/icon/"
Alias /awstatscss "/var/www/awstats/examples/css"

3. Edit the following line from /etc/awstats/awstats.localhost.localdomain.conf.

SiteDomain="domain.com"
HostAliases="www.domain.com"

4.Rename the configuration file to the correct one,
mv /etc/awstats/awstats.localhost.localdomain.conf /etc/awstats/awstats.domain.com.conf
5. Update the statistic,
/usr/bin/awstats_updateall.pl now -confdir=”/etc” -awstatsprog=”/var/www/awstats/awstats.pl”