How to Install AWStats on Linux Mint

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.

Prerequisites

Before proceeding with the installation, make sure you have the following:

Step 1: Install AWStats

To install AWStats, follow these steps:

  1. Open the Terminal and log in as a root user.

  2. Update the package lists by running the following command:

    apt-get update
    
  3. Install AWStats using the following command:

    apt-get install awstats
    

Step 2: Configure AWStats

After successfully installing AWStats, you need to configure the tool to be able to use it. Here's how to do it:

  1. Open the configuration file with your favorite text editor:

    nano /etc/awstats/awstats.conf
    
  2. 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.

  3. Save and exit the file.

Step 3: Generate Reports

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!