How to Install AWStats on Ubuntu 18.04


Easily deploy your favorite applications in seconds at an unbeatable price for your next projects.

Installing AWStats on Ubuntu 18.04

AWStats is a powerful and feature-rich log analyzer tool that generates advanced web, streaming, FTP, or mail server statistics graphically. It allows you to analyze who is visiting your website, what pages they are visiting, and other important information.


To install AWStats on Ubuntu 18.04, follow these steps:

sudo apt update
sudo apt upgrade
sudo apt install awstats
sudo nano /etc/awstats/awstats.conf

Inside the configuration file, you will find various settings that you can modify to match your specific setup. Pay attention to the following:

sudo /usr/lib/cgi-bin/awstats.pl -config=awstats.conf -update
sudo nano /etc/apache2/conf-available/awstats.conf

Add the following lines to the configuration file, replacing "example.com" with your domain name:

Alias /awstatsclasses "/usr/share/awstats/lib/"
Alias /awstats-icon/ "/usr/share/awstats/icon/"
Alias /awstatscss "/usr/share/doc/awstats/examples/css"
ScriptAlias /awstats/ /usr/lib/cgi-bin/
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
sudo a2enconf awstats
sudo systemctl reload apache2
sudo nano /etc/apache2/sites-available/awstats.conf

Add the following content to the file:

  ServerName awstats.example.com
  DocumentRoot /usr/lib/cgi-bin/
    Options None
    AllowOverride None
    Order allow,deny
    Allow from all
      AuthName "Restricted Area"
      AuthType Basic
      AuthUserFile /etc/awstats/.htpasswd
      require valid-user
sudo a2ensite awstats.conf
sudo systemctl reload apache2
sudo htpasswd -c /etc/awstats/.htpasswd your_username
  1. Make sure your system is up to date:
  2. Install AWStats:
  3. Configure AWStats:
    • LogFile: Set the path to your web server's access log file. For example:
    • LogFormat: Set the log format of your web server. For Apache's default format, use:
    • SiteDomain: Set the domain name of your website:
    • HostsAliases: Set the aliases for your web server. For example:
      HostAliases="localhost REGEX[^.*$]"
  4. Generate initial statistics:
  5. Configure Apache to serve AWStats:
  6. Enable the new configuration:
  7. Create a virtual host file for AWStats:
  8. Enable the new virtual host:
  9. Add a user for accessing AWStats:
  10. Access AWStats in your web browser:

Remember to replace "example.com" with your actual domain name. You should see the AWStats interface and be able to navigate through your website's statistics.


AWStats is a valuable tool for analyzing website traffic and gaining insights into your visitors' behavior. By following the steps outlined in this guide, you can easily install AWStats on your Ubuntu 18.04 server and start monitoring your website's statistics.

Refer A Friend
Get $25

Installing AWStats
Ubuntu 18.04
AWStats installation
AWStats Ubuntu tutorial
Ubuntu AWStats setup
AWStats web analytics
AWStats server monitoring
AWStats configuration guide
AWStats Ubuntu server
AWStats installation steps

Why Customers Love Us

What our customers say about us

Ready To Get Started For Free?

Create your free account today.