We're here to assist with any of your needs, don't hestitate to reach out.
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
http://awstats.example.com/awstats.pl?config=awstats
LogFile="/var/log/apache2/access.log"
LogFormat=1
SiteDomain="example.com"
HostAliases="localhost 127.0.0.1 REGEX[^.*$]"
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.
What our customers say about us
Create your free account today.