[Nottingham] Webalizer Configuration

Graeme Fowler graeme at graemef.net
Thu Aug 3 09:34:09 BST 2006


On Wed, 2006-08-02 at 19:00 +0200, Johan Boshoff wrote:
> I am new to this list and also quite new to 'administering' linux.


> I set up Webalizer on my fedora core 4 server, but I do not know how to 
> import the details of the bandwidth logged in /var/log/httpd/accesslog.

Firstly you need to create a configuration file which knows:

a) where the logfile is, and
b) where to plonk the output

As you mention in a later message you're running a Fedora Core 4 server,
the package comes with a default config file /etc/webalizer.conf which
looks at /var/log/httpd/access_log and puts the output
into /var/www/usage.

You can usually access this by going to http://hostname/usage although
there's a default Apache2 config snippet placed
into /etc/httpd/conf.d/webalizer.conf which normally restricts access to
the local host; you probably need to comment out the access restrictions
if you want wider access or, alternatively, investigate changing the
access controls such that they become user-specific.

> I also want to know what command to run to actually update the details so 
> that I can create a cron job to update every 10 minutes.

Again, the package comes with a cron job in /etc/cron.daily/00webalizer
which runs the application once per day. You could simply call that more
frequently from cron, or take a copy of it and tailor it for your other

> Then, how do I configure webalizer to show different details for each domain 
> I host on the webserver?

You need a separate config file per virtual host with appropriate
settings, which gets called (as you suggest) every ten minutes. I
personally would never do this; I'd put a cgi wrapper round it so the
stats only get generated when necessary _or_ I'd run it once per day in
a sequence against all the config/log combinations in order (this is how
I used to run it). The webalizer can get very resource hungry on big
logfiles, and can generate lots of DNS lookups if not configured
properly, so can consume resources you ideally want for web serving.

> Basically I want a user to go to his domain/stats to show the details.

It sounds, with respect, like you probably need to do some reading. Make
a start with the generic docs at http://www.mrunix.net/webalizer/ to
understand how the package itself works, then move to the docs installed
with your system. "man webalizer" might help you out a little.


More information about the Nottingham mailing list