CentOS Stream 8
Sponsored Link

Apache httpd : Log Report : AWStats2021/03/15

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]

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

# line 172 : set domains or IP addresses you'd like to exclude on reports

[root@www ~]#
vi /etc/httpd/conf.d/awstats.conf
# line 30 : add access permission if you need

# localhost only by default

Require ip
[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: 22
 Found 0 dropped records,
 Found 0 comments,
 Found 0 blank records,
 Found 1 corrupted records,
 Found 0 old records,
 Found 21 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