How to Install AWStats on EndeavourOS Latest

AWStats is an open-source tool that generates detailed web analytics reports from server logs. It is available for free and can be installed on various operating systems including Linux. In this tutorial, we will show you how to install AWStats on EndeavourOS Latest.

Prerequisites

Before installing AWStats, you need to have the following prerequisites installed on your EndeavourOS system:

These prerequisites can be installed using the Pacman package manager:

sudo pacman -S apache perl libwww perl-cgi perl-dbd-mysql perl-dbi perl-text-csv perl-time-hires perl-yaml perl-yaml-syck perl-yaml-tiny geoip-database geoip geoip-free perl-geoip-free perl-geoip-pureperl

Step 1: Download and Install AWStats

Visit the AWStats official website, download the latest version of the software and extract the downloaded archive to your EndeavourOS system:

wget https://prdownloads.sourceforge.net/awstats/awstats-7.8.tar.gz
tar -xf awstats-7.8.tar.gz -C /usr/local/src/

Once you have extracted the archive, move the AWStats configuration file to the etc directory and set the appropriate permissions:

sudo cp /usr/local/src/awstats-7.8/wwwroot/cgi-bin/awstats.model.conf /etc/awstats/awstats.conf
sudo chmod 644 /etc/awstats/awstats.conf

Step 2: Configure AWStats

After installing AWStats, you need to configure the software. Open the configuration file /etc/awstats/awstats.conf using a text editor and set the basic options such as SiteDomain, LogFile, LogFormat, and DNSLookup. Set the LogFile option to the path of your Apache access log file, which is usually located at /var/log/httpd/access_log.

SiteDomain="example.com"
LogFile="/var/log/httpd/access_log"
LogFormat=1
DNSLookup=1

Step 3: Enable CGI Support in Apache

Before accessing AWStats through a web browser, you need to enable CGI support in Apache. Open the Apache configuration file /etc/httpd/conf/httpd.conf using a text editor and uncomment the following line:

LoadModule cgi_module modules/mod_cgi.so

Restart the Apache web server to apply the changes:

sudo systemctl restart httpd.service

Step 4: Generate AWStats Reports

To generate AWStats reports, run the following command as the root user:

sudo /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=example.com -update

This will process the Apache access log file and generate a report for the domain example.com. You can view the report by opening a web browser and navigating to:

http://<your-server-ip>/cgi-bin/awstats.pl?config=example.com

Replace <your-server-ip> with the IP address of your EndeavourOS system.

Conclusion

By following this tutorial, you have successfully installed and configured AWStats on EndeavourOS Latest. You can now use AWStats to generate detailed web analytics reports from your Apache access logs.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!