AWStats is an open source tool used for analyzing web server logs. In this tutorial, we will guide you on how to install AWStats in Clear Linux Latest.
Before proceeding with the installation, ensure that the following requirements are met:
Update your system:
sudo swupd update
Install AWStats:
sudo swupd bundle-add awstats
After installing AWStats, modify the Apache configuration in order to enable CGI scripts. Open the configuration file /etc/httpd/conf/httpd.conf
using the following command:
sudo nano /etc/httpd/conf/httpd.conf
Add the following lines at the bottom of the file:
ScriptAlias /awstats/ /usr/share/awstats/wwwroot/cgi-bin/
Alias /awstats-icon/ /usr/share/awstats/wwwroot/icon/
Save and close the file.
Create the AWStats configuration file:
sudo cp /usr/share/awstats/wwwroot/cgi-bin/awstats.model.conf /etc/awstats/awstats.conf
Open the configuration file /etc/awstats/awstats.conf
using the following command:
sudo nano /etc/awstats/awstats.conf
Modify the configuration in the file based on your preferences. You can change the log file location, enable/disable certain features, and set up authentication if needed. The file has in-line comments which offer guidance on how to make changes.
Once you finish configuring, save and close the file.
Restart Apache:
sudo systemctl restart httpd
Generate the website statistics with the following command:
sudo /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=awstats -update
Finally, access the statistics generated by AWStats by visiting the following URL using a browser:
http://localhost/awstats/awstats.pl?config=awstats
Note that you can replace "localhost" with the IP address of the server if accessing the statistics remotely.
In this tutorial, you learned how to install AWStats on Clear Linux Latest. Once installed and configured, AWStats offers insights into your web server logs, enabling you to make informed decisions related to your website.
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!
Alternatively, for the best virtual desktop, try Shells!