Use The Webalizer to Analyze Apache Web Logs

The Webalizer is a free, open source application for analyzing Apache log files. It provides highly detailed and configurable web usage reports in an HTML format which you can view in a browser. Learn how to install The Webalizer on a Cloud Server, and configure the server to automatically run this application at regular intervals in order to update the statistics.

Requirements

  • A Cloud Server with Linux (CentOS 7)
  • Apache installed and running

Free Cloud Server Trial from IONOS

Try out a Cloud Server for free now - test your IONOS Cloud Server for 30 days!

REST API
Unlimited traffic
VMware virtualization
Note

Apache is installed and running on a standard Linux installation by default. If your server was created with a minimum installation, you will need to install and configure Apache before you proceed.

Use Webalizer under CentOS 7

Update the server's installed packages:

sudo yum update

Install The Webalizer:

sudo yum install webalizer 

Run The Webalizer to analyze the existing Apache log files:

sudo webalizer

By default, the report for the server's primary domain will be saved to /var/www/usage. In order to be able to view this in a browser, open the site's main Apache configuration file for editing:

sudo nano /etc/apache2/sites-available/000-default.conf

Add the following alias:

Alias "/usage" "/var/www/usage"

Save and exit the file. Then restart Apache for the changes to take effect:

sudo systemctl restart httpd

You will now be able to view The Webalizer reports at http://example.com/usage.

Add The Webalizer to Cron

Cron is a Linux utility which runs commands at the specified intervals. Open the crontab file for editing:

sudo crontab -e

Add the following line to this file to run the webalizer command once an hour:

0 * * * *      /usr/bin/webalizer

Save and exit the file.


Wait! We’ve got something for you!
Discover our special deals at IONOS!
Our most popular products, including cloud storage, hosting,
domains and more - now on sale.