CentOS 8
Sponsored Link

Apache httpd : Log Report : AWStats
2020/10/02
 
Install AWStats to report httpd access logs.
[1] Install and Configure AWstats.
# install from EPEL, PowerTools

[root@www ~]#
dnf --enablerepo=epel,PowerTools -y install awstats
# [awstats.(hostname).conf] is generated automatically

[root@www ~]#
vi /etc/awstats/awstats.www.srv.world.conf
# line 126 : set [1] if httpd log format is [combined]

# for [common], set [4]

LogFormat=1
# line 157 : confirm hostname (system's hostname is set automatically)

SiteDomain="www.srv.world"
# line 172 : set domains or IP addresses you'd like to exclude on reports

HostAliases="REGEX[^.*www\.srv\.world$]"
[root@www ~]#
vi /etc/httpd/conf.d/awstats.conf
# line 30 : add access permission if you need

# localhost only by default

Require ip 10.0.0.0/24
[root@www ~]#
systemctl restart httpd
# generate reports ( reports are updated for hourly by Cron )

[root@www ~]#
/usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=www.srv.world -update

Create/Update database for config "/etc/awstats/awstats.www.srv.world.conf" by AWStats version 7.8 (build 20200416)
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: 6
 Found 0 dropped records,
 Found 0 comments,
 Found 0 blank records,
 Found 0 corrupted records,
 Found 0 old records,
 Found 6 new qualified records.
[2] Access to the URL [(your server's name or IP address/)/awstats/awstats.pl] from any client computer on allowed network with web browser. Then you can see httpd access reports.
Matched Content