bsdzone BSDZone - FreeBSD help, how-to guides, and articles.

  [ Home ]   [ Current News ]   [ Howto Archive ]   [ Books ]   [ Search ]   [ Links ]   [ Contact ]  [ About ]  


Webalizer
Apache - 17 Oct 04

Webalizer for multiple virtual domains?

I assume you already have webalizer installed? right? If not install it first.

# mkdir /etc/webalizer
# cd /etc/webalizer
# cp /some/path/to/webalizer.conf .
# vi webalizer.conf

Configure basics to meet your fancy.
# cp webalizer.conf domain1.conf
# cp webalizer.conf domain2.conf
# cp webalizer.conf domain3.conf
vi all config files for report and log locations of each virtual domain.

# rm webalizer.conf
# cd /usr/sbin
# vi webalizer.sh

#!/bin/sh
cd /etc/webalizer
for i in *
do /path/to/webalizer -c $i;
done

# chmod 550 /usr/sbin/webalizer.sh

Test it.
# /usr/sbin/webalizer.sh
Open you reports to make sure that they worked.

# vi /etc/crontab
Add
min hour * * * root /usr/sbin/webalizer.sh (change min and hour into a numerical minute and hour)

Now webalizer should run every night for all your domains.


Leave a Reply