Connect with us

Hi, what are you looking for?


How to Configure Awstats for Apache on CentOS 7

How to Setup AWStats for Apache on CentOS 7 / RHEL 7 / SL 7 / OL 7. The AWStats stands for Advanced Web Statistics. The AWStats is a web software written in Perl language.  It is an advanced log file analyzer having lots of advance statistics features. The AWStats is the most widely used log analyzer program with Apache Web Servers on Respective Enterprise Linux.  This tutorial shows how to install and configure AWStats for Apache on EL 7. You need to follow all the steps carefully to setup the AWStats for Apache.

How to Setup AWStats for Apache on EL7 ?

Step-1(Install the Apache Web Server on EL)

How to install Apache Web Server On EL 7 is given in the Tutorial.

Step-2 (Install the EPEL Repository)
[root@techbrown ~]# wget
[root@techbrown ~]# rpm -ivh epel-release-latest-7.noarch.rpm
Step-3 (Install the AWStats using yum command)
[root@techbrown ~]# yum install awstats
Step-4 (Change the IP with your FQDN in host file)
[root@techbrown ~]# vim /etc/hosts
Sample Output   localhost localhost.localdomain localhost6 localhost6.localdomain6
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

You can Change it with your IP address and FQDN (Fully Qualified Domain Name)
Step-5 (Allow and Deny your IP Address on AWStats Configuration file)
[root@techbrown ~]# vim /etc/httpd/conf.d/awstats.conf

Find the given lines and after that you can Allow and Deny your IP Address using Allow from and Deny From by adding the IP address after the parameter.

Advertisement. Scroll to continue reading.
<Directory "/usr/share/awstats/wwwroot">
    Options None
    AllowOverride None
    <IfModule mod_authz_core.c>
        # Apache 2.4    
        Require local
    <IfModule !mod_authz_core.c>
        # Apache 2.2
        Order allow,deny
        Allow from
        Allow from
Step-6 (Copy the default AWStats FQDN with your AWStats FQDN configuration file)
[root@techbrown ~]# cp -rv /etc/awstats/awstats.localhost.localdomain.conf /etc/awstats/
Step-7 (Edit the AWStats FQDN file with your Domain Name and Host Aliases)
[root@techbrown ~]# vim /etc/awstats/

Find the given lines and replace with your FQDN (Fully Qualified Domain Name)


Find the given lines and replace with your FQDN and IP Address

HostAliases=" localhost"
Step-8 (Restart the Apache Services)
[root@techbrown ~]# systemctl restart httpd
Step-9 (Update the AWStats Configuration File)
[root@techbrown ~]# /usr/share/awstats/wwwroot/cgi-bin/ -update
Sample Output
Create/Update database for config "/etc/awstats/" by AWStats version 7.4 (build 20150714)
From data in log file "/var/log/httpd/access_log"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...
Jumped lines in file: 0
Parsed lines in file: 130
 Found 114 dropped records,
 Found 0 comments,
 Found 0 blank records,
 Found 0 corrupted records,
 Found 0 old records,
 Found 16 new qualified records.
Step-10 (Test AWStats whether it is working or not)

Open Web Browser to visit AWstats page For that you can visit
You can change the FQDN with your domain name and Web Browser Shows AWStats Web panel.
If it Shows AWStats Web panel then it works successfully with Apache Web Server on Respective Enterprise Linux if not then follow all the steps carefully.

Final Words

Thats all now you have configured AWStats so that it works successfully with the Apache Web Servers on Enterprise Linux 7. If you have issues regarding this topic you may use the command section below.

Advertisement. Scroll to continue reading.

You May Also Like


How to auto upgrade JioFi firmware for JioFi 2 / JioFi 3 / JioFi 4 / JioFi 5 / JioFi 6 and other JioFi...


Internet is the most important public network for connecting to the WEB. For internet connection requirement the ISP is required as well as it...


How to download and install the Mobile Intel 4 Series Express Chipset Graphics Drivers for Windows 10.  Windows 10 is the one of the...


How to Install and Configure PCSX2 on Windows 10. The Windows 10 is the most recommended operating system for the Games. In stream platform...