AWStats is an open-source tool designed to help analyze and measure website traffic statistics. It parses the webserver access logs, and display metrics such as visitors, pages viewed, and more. In this tutorial, we'll explain how to install AWStats on a Linux Mint distribution.
Before proceeding with the installation, make sure you have the following:
To install AWStats, follow these steps:
Open the Terminal and log in as a root user.
Update the package lists by running the following command:
apt-get update
Install AWStats using the following command:
apt-get install awstats
After successfully installing AWStats, you need to configure the tool to be able to use it. Here's how to do it:
Open the configuration file with your favorite text editor:
nano /etc/awstats/awstats.conf
Look for the lines that start with LogFile, SiteDomain, and HostAliases, and modify them according to your server settings:
LogFile="/path/to/your/access_log_file"
SiteDomain="yourdomain.com"
HostAliases="localhost 127.0.0.1"
Make sure to replace the values with your log file path, your server domain name, and your host aliases.
Save and exit the file.
To generate AWStats reports, you need to run the following command:
/usr/lib/cgi-bin/awstats.pl -config=yourdomain.com -update
Make sure to replace yourdomain.com with the name of your website.
After running the command, AWStats will generate a report, which you can access by opening the following link in your web browser:
http://yourdomain.com/cgi-bin/awstats.pl?config=yourdomain.com
Alternatively, you can configure your web server to make the AWStats report accessible via a URL of your choice.
And that's it! You've successfully installed and configured AWStats on a Linux Mint machine.
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!