Learn how to install and use Apache Tomcat on CentOS 7. Apache Tomcat is a Java Servlet container developed by Apache to which allows you to deploy Java servlets and JSPs. Apache Tomcat also functions as a web server, which is able to support small to medium-sized websites. This tutorial also covers how to install and use the Tomcat Web Admin Manager, which allows you to manage Tomcat and virtual...
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.
- 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!
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:
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.