Making webalizer do DNS lookups

By | December 24, 2005

The default install of Webalizer on Debian doesn’t perform DNS lookups on the log files, although it is capable of it. There are three ways of getting Webalizer to do this, in rough order of recommendedness: 1) make your webserver do the lookups when it writes the logfiles (this makes your webserver slower, and has been a source of vulnerabilities in the past), 2) use logresolve to pre-process your log files (logresolve isn’t included in Debian sarge), and 3) tell webalizer to do it.

Making webalizer do it is pretty easy, simply add lines similar to the following in /etc/webalizer.conf:

DNSCache /var/log/apache2/dns_cache.db
DNSChildren 5


The first tells it where to put it’s cache file, the second tells it how many resolutions to do at once. The higher, the faster, but also the higher load on the system.

If you add these lines to the config, keep in mind that only new entries will be updated, and so it won’t be until the next month rolls around that you have a complete statistics by domain name.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.