This guide installs AWStats and configures it to parse your web server logs.
On Debian/Ubuntu:
sudo apt update
sudo apt install -y awstats
Use the configuration helper to create a per-site config file:
sudo /usr/share/awstats/tools/awstats_configure.pl
Follow the prompts to set your domain name, log file path, and web server settings. This creates /etc/awstats/awstats.example.com.conf.
sudo /usr/lib/cgi-bin/awstats.pl -config=example.com -update
You can enable the AWStats CGI in your web server or generate static HTML reports. The official documentation includes Apache/Nginx examples.
Add a cron job to update stats regularly:
sudo crontab -e
Example cron entry (daily):
0 2 * * * /usr/lib/cgi-bin/awstats.pl -config=example.com -update > /dev/null
Check the AWStats setup documentation or reach out via our contact page.