AWStats is a free tool that use to create statistics by examining Apache log information, ftp or mail web servers. In this article we will guide you to install and configure AWStats on CentoOS, RHEL systems.

Step 1 is to Install EPEL repository using below commands on CentOS Systems.

CentOS/RHEL 6:
# rpm -Uvh

CentOS/RHEL 5:
# rpm -Uvh

Install AWStats package using yum. Its will also install all other required dependencies.

yum install awstats

By default AWStats creates an Apache configuration file /etc/httpd/conf.d/awstats.conf.

Default settings is good to go except allow from access. If you need to access AWStats from network, upgrade the allow from ip with your system IP from where you need to access it.

nano /etc/httpd/conf.d/awstats.conf

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/
<Directory "/var/www/awstats/">
 Options ExecCGI
 order deny,allow
 deny from all
 allow from
 allow from

#Alias /css/ /var/www/awstats/css/
#Alias /js/ /var/www/awstats/js/
Now restart the Apache services:

service httpd restart
Rename the configuration file to the correct one,and make changes as below:

cp /etc/awstats/awstats.localhost.localdomain.conf /etc/awstats/
nano /etc/awstats/

Update the Statistics:

/usr/bin/ now -confdir=”/etc” -awstatsprog=”/var/www/awstats/”


Leave a Reply

Your email address will not be published. Required fields are marked *