Webalizer – a program for reporting and statistics on log files.
Let’s say there is an installed Apache2 web server, for example, as I described in this article – Installing and Configuring the Apache2 Web Server
The Webalizer installation command in Ubuntu:
sudo apt-get install webalizer
After installation, move the created directory /var/www/webalizer to the root of the Apache2 /var/www/html/ web server:
sudo mv /var/www/webalizer /var/www/html/
Open the configuration file Webalizer in any text editor, for example nano:
sudo nano /etc/webalizer/webalizer.conf
Let’s specify what log files should be analyzed, by default there is already indicated:
LogFile /var/log/apache2/access.log.1 LogType clf
You can specify ftp logs as follows:
LogFile /var/log/proftpd/xferlog LogType ftp
You can also specify the type of logs squid or w3c.
And also change the directory where reports will be created:
OutputDir /var/www/html/webalizer
If necessary, we specify the encoding of HTML pages:
HTMLHead <META http-equiv="Content-Type" CONTENT="text/html" charset="UTF-8">
You can specify a font:
TrueTypeFont /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf
Launch Webalizer to generate statistics:
sudo webalizer
Now you can open the report in the browser http://192.168.1.2/webalizer/, where 192.168.1.2 is the IP of your server.
You can re-configure the Webalizer with the command:
dpkg-reconfigure webalizer