We're here to assist with any of your needs, don't hestitate to reach out.
AWStats is a powerful log analyzer tool that generates advanced web, streaming, FTP, or mail server statistics, graphically representing data in easy-to-understand reports. It provides detailed insights into visitor activity, including the number of visits, pages viewed, operating systems used, browsers used, and much more.
Before installing AWStats, it is recommended to update the system packages to their latest versions. Open a terminal and run the following command:
sudo dnf update
To install AWStats, use the following command:
sudo dnf install awstats
Once the installation is complete, you need to configure AWStats to analyze your website's logs. The configuration file can be found at /etc/awstats/awstats.conf
. Open this file in a text editor:
sudo vi /etc/awstats/awstats.conf
In this file, you need to make the following changes:
LogFile
variable to the path of your website's log file.SiteDomain
variable to your website's domain name.DirIcons
variable to /var/www/icons
.Save and close the file.
To generate AWStats reports, use the following command:
sudo /usr/share/awstats/tools/awstats_buildstaticpages.pl -update -config=awstats.conf -dir=/var/www/html/awstats
Make sure to replace awstats.conf
with the name of your configuration file, and /var/www/html/awstats
with the directory where you want to store the generated reports.
The reports will now be accessible from your web browser by accessing http://your-domain.com/awstats/awstats.pl
.
To keep your AWStats reports updated regularly, it is recommended to set up a cron job. Open the crontab file for editing:
sudo crontab -e
Add the following line to the file to run the AWStats update script every hour:
0 * * * * /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=awstats.conf -update
Save and close the file.
You have successfully installed and configured AWStats on CentOS 8. You can now analyze your website's logs to gain valuable insights into your visitor activity.
What our customers say about us
Create your free account today.