TRENDING
  • Linux
  • Shell Script
  • Cloud
  • DevOps
  • About US
SUBSCRIBE
  • CLOUD
  • DEVOPS
  • LINUX
  • SHELL SCRIPT
Reading: How to Configure Awstats on AlmaLinux / Rocky Linux
Share
TechBrownTechBrown
Aa
  • CLOUD
  • DEVOPS
  • LINUX
  • SHELL SCRIPT
Search
  • CLOUD
  • DEVOPS
  • LINUX
  • SHELL SCRIPT
Follow US
© 2014 - 2022 TechBrown. All Rights Reserved.
Linux

How to Configure Awstats on AlmaLinux / Rocky Linux

July 3, 2016
Share
4 Min Read
SHARE
Contents
Step-1(Install the Apache Web Server on EL)Step-2 (Install the AWStats using yum command)Step-3 (Allow and Deny your IP Address on AWStats Configuration file)Step-4 (Copy the default AWStats FQDN with your AWStats FQDN configuration file)Step-5 (Update the AWStats Configuration File)Step-6 (Test AWStats whether it is working or not)

The AWStats stands for Advanced Web Statistics. The AWStats is a web software written in Perl language.  It is an advanced log file analyser having lots of advance statistics features. The AWStats is the most widely used log analyser program with Apache Web Servers on AlmaLinux / Rocky Linux / Amazon Linux.  This tutorial shows how to install and configure AWStats for Apache. You need to follow all the steps carefully to setup the AWStats for Apache.

Step-1(Install the Apache Web Server on EL)
# dnf install httpd* && systemctl enable httpd

Install the EPEL Repository

# wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
# rpm -ivh epel-release-latest-8.noarch.rpm
Step-2 (Install the AWStats using yum command)
# dnf install awstats

Change the IP with your FQDN in host file

# vim /etc/hosts

Sample Output

127.0.0.1   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)

127.0.0.1     techbrown.com
192.168.0.1   techbrown.com
Step-3 (Allow and Deny your IP Address on AWStats Configuration file)
# 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.

<Directory "/usr/share/awstats/wwwroot">
    Options None
    AllowOverride None
    <IfModule mod_authz_core.c>
        # Apache 2.4    
        Require local
    </IfModule>
    <IfModule !mod_authz_core.c>
        # Apache 2.2
        Order allow,deny
        Allow from 127.0.0.1
        Allow from 192.168.0.1
    </IfModule>
</Directory>
Step-4 (Copy the default AWStats FQDN with your AWStats FQDN configuration file)
# cp -rv /etc/awstats/awstats.localhost.localdomain.conf /etc/awstats/awstats.techbrown.com.conf

Edit the AWStats FQDN file with your Domain Name and Host Aliases

# vim /etc/awstats/awstats.techbrown.com.conf

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

SiteDomain="techbrown.com"

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

HostAliases="www.techbrown.com localhost 127.0.0.1"

Restart the Apache Services

# systemctl restart httpd
Step-5 (Update the AWStats Configuration File)
# /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=techbrown.com -update

Sample Output

Create/Update database for config "/etc/awstats/awstats.techbrown.com.conf" 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-6 (Test AWStats whether it is working or not)

Open Web Browser to visit AWstats page For that you can visit http://techbrown.com/awstats/awstats.pl?config=techbrown.com
You can change the FQDN with your domain name and Web Browser Shows AWStats Web panel.
awstats
If it Shows AWStats Web panel then it works successfully with Apache Web Server on AlmaLinux / Rocky Linux / Amazon Linux if not then follow all the steps carefully.

Congratulations now you have installed Awstats on AlmaLinux / Rocky Linux / Amazon Linux.

You Might Also Like

How to Optimize MySQL Performance on AlmaLinux / Rocky Linux

How to Enable TLS 1.3 on Apache and Nginx

5 Security Tips to Protect your WordPress Website from Hackers

How to Enable AES-128 Bit SSL Cipher with TLS 1.3 on Nginx Web Server

How to Set Up NGINX Web Server on AlmaLinux / Rocky Linux

Sign Up For Newsletter

Be keep up! Get the latest articles delivered straight to your inbox.

TechBrown Solutions July 3, 2016
Share this Article
Facebook TwitterEmail Print
Share
Leave a comment Leave a comment

Leave a Reply Cancel reply

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

TRENDING

Linux

How to Configure HSTS for Apache / NGINX / IIS / Lighttpd Web Servers

Linux

How to Enable Persistent Object Cache using Redis on WordPress

Linux

How to Enable TLS 1.3 on Apache and Nginx

Linux

How to Turn Off Apache Server Signature on AlmaLinux / Rocky Linux

You Might Also Like

Linux

How to Optimize MySQL Performance on AlmaLinux / Rocky Linux

October 19, 2021
Linux

How to Enable TLS 1.3 on Apache and Nginx

March 14, 2021
Linux

5 Security Tips to Protect your WordPress Website from Hackers

November 8, 2020
Linux

How to Enable AES-128 Bit SSL Cipher with TLS 1.3 on Nginx Web Server

November 7, 2020

Always Stay Up to Date

Subscribe to our newsletter to get our newest articles instantly!

Follow US on Social Media

Facebook Twitter Youtube Rss

© 2014 - 2022 Techbrown. All Rights Reserved.

  • About Us
  • Terms of Service
  • Cookie Policy
  • Privacy Policy
By using this site, you agree to the Privacy Policy, Cookie Policy and Terms of Service.
Accept

Removed from reading list

Undo
AdBlock Detected
Our site is an advertising supported site. Please whitelist to support our site.
Okay, I'll Whitelist
Welcome Back!

Sign in to your account

Lost your password?