I currently use Webalizer to analyze my web server logs. However, several websites are hosted from my servers, so aggregate data on all websites is nothing but a bunch or pretty graphs and numbers. In order for all that data to be useful, I had to make each virtual host log to separate files for Webalizer to analyze separately.
In my httpd.conf, I have the following logging setting, which is actually one of the default settings:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
Then, within each <VirtualHost>, I have specified a CustomLog directive:
CustomLog /var/log/apache/www.inlesserterms.net/access_log combined
Next, I created a directory inside /etc named webalizer. Inside this directory, I created a separate .conf file for each of the virtual hosts configured in Apache. Each .conf file had these directives:
LogFile /var/log/apache/www.inlesserterms.net/access_log OutputDir /usr/share/apache2/htdocs/webalizer/www.inlesserterms.net HostName www.inlesserterms.net HideReferrer inlesserterms.net*
Of course, I had to create /var/log/apache/www/inlesserterms.net and /usr/share/apache2/htdocs/webalizer/www.inlesserterms.net directories.
Finally, I created a Cron job which will run the following command daily:
for i in /etc/webalizer/*.conf do webalizer -c $i doneAll of this causes Webalizer to create separate statistics pages for each virtual host.
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |