Ubuntu 24.04
Sponsored Link

Apache2 : Log Report : AWStats2024/05/31

 

Install AWStats to report httpd access logs.

[1] Install and Configure AWstats.
root@www:~#
apt -y install awstats
root@www:~#
vi /etc/awstats/awstats.conf
# line 126 : set [1] if httpd log format is [combined]
# for [common], set [4]

LogFormat=
1
# line 157 : set hostname

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

HostAliases="localhost 127.0.0.1
REGEX[^.*www\.srv\.world$]
"
root@www:~#
vi /etc/apache2/conf-available/awstats.conf
# create new

Alias /awstats-icon/ /usr/share/awstats/icon/
Alias /awstatsclasses/ /usr/share/java/awstats/

<Directory /usr/share/awstats>
    Options FollowSymLinks
    AllowOverride None
    # access permission for your local network
    Require ip 127.0.0.1 10.0.0.0/24
</Directory>

root@www:~#
a2enconf awstats

Enabling conf awstats.
To activate the new configuration, you need to run:
  systemctl reload apache2

root@www:~#
a2enmod cgid

Enabling module cgid.
To activate the new configuration, you need to run:
  systemctl restart apache2

root@www:~#
systemctl restart apache2
# generate reports ( reports are updated for hourly by Cron )

root@www:~#
/usr/share/awstats/tools/update.sh

root@www:~#
/usr/share/awstats/tools/buildstatic.sh

[2] Access to the URL [(your server's name or IP address/)/cgi-bin/awstats.pl] from any client computer on allowed network with web browser. Then you can see http access reports.
Matched Content