AWStats is an open-source web analytics tool that generates advanced web, streaming, ftp, or mail server statistics graphically. In this tutorial, we will walk-through the steps to install AWStats on Fedora Server Latest.
Before you begin, make sure you have the following requirements:
AWStats requires some dependencies to function correctly. You can install the dependencies as shown below:
sudo dnf install -y httpd perl perl-CGI perl-CPAN perl-DBD-MySQL perl-DBI perl-Module-Pluggable perl-Time-HiRes \
perl-YAML shellinabox unzip wget
You can download the latest version of AWStats using the following command:
wget https://sourceforge.net/projects/awstats/files/awstats/7.8/awstats-7.8.zip
After downloading the AWStats package, extract it using the following command:
unzip awstats-7.8.zip
AWStats requires a configuration file that defines the location of the web server access log and the details of the server to be monitored. To create the configuration file, run the following command:
sudo cp /opt/awstats-7.8/wwwroot/cgi-bin/awstats.model.conf /etc/awstats/awstats.conf
In AWStats configuration file, you need to make some changes for the AWStats to function correctly. Open the configuration file in your preferred editor:
sudo vi /etc/awstats/awstats.conf
Make the following changes:
LogFormat
parameter to the web server access log format. If you're using Apache web server, the default access log format is LogFormat = "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
.SiteDomain
parameter to the domain name or IP address of the server being monitored.HostAliases
parameter to the domain name(s) or IP address(es) of the server being monitored.LogFile
parameter to the location of the web server access log file. If you're using Apache web server, the default access log location is /var/log/httpd/access_log
.After configuring AWStats, you can generate a report by running the following command:
sudo /opt/awstats-7.8/wwwroot/cgi-bin/awstats.pl -update -config=mywebsite
Here, mywebsite
is the name of the configuration file without the .conf
extension.
After generating the report, you can access the AWStats report by opening a web browser and navigating to http://localhost/awstats/awstats.pl?config=mywebsite. Replace mywebsite
with the name of your configuration file without the .conf
extension.
Congratulations, you have successfully installed and configured AWStats on Fedora Server Latest. You can now monitor the web server statistics through the AWStats graphical interface.
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!