How to Install AWStats on Clear Linux Latest

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.

Prerequisites

Before proceeding with the installation, ensure that the following requirements are met:

Steps

  1. Update your system:

    sudo swupd update
    
  2. Install AWStats:

    sudo swupd bundle-add awstats
    
  3. 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.

  4. Create the AWStats configuration file:

    sudo cp /usr/share/awstats/wwwroot/cgi-bin/awstats.model.conf /etc/awstats/awstats.conf
    
  5. Open the configuration file /etc/awstats/awstats.conf using the following command:

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

  7. Once you finish configuring, save and close the file.

  8. Restart Apache:

    sudo systemctl restart httpd
    
  9. Generate the website statistics with the following command:

    sudo /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=awstats -update
    
  10. 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.

Conclusion

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!