[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Web stats for multiple domains



Here i assume u have a structure like this:
- Path to each domain: /var/www/DOMAINNAME
- Path to domain stats: /var/www/DOMAINNAME/stats
but you can edit below to fit your needs.

First tell apache to use different log files for each domain and to save them in /var/log/apache. Just put the following line inside each "<VirtualHost>":
CustomLog /var/log/apache/DOMAINNAME_access.log combined


Then in /etc/cron.daily set up a script like this:
for LOGFILE in `ls /var/log/apache | egrep ".*_access.log$"`
do
webazolver -Q -N 10 -c /etc/webalizer.conf -o /var/cache -D /var/cache/webalizer_dns.db /var/log/apache/$LOGFILE
done
for LOGFILE in `ls /var/log/apache | egrep ".*_access.log$"`
do
DOMAIN=`echo $LOGFILE | sed -e "s/_access.log$//"`
/usr/bin/webalizer -Q -p -c /etc/webalizer.conf -n $DOMAIN -o /var/www/$DOMAIN/stats -M 0 /var/log/apache/$LOGFILE
done





Jasper Metselaar wrote:
Hi,

I am currently using webalizer to generate website statistics for my customers, but to keep a systemwide view I would like to have some kind of stats overview that will provide statistics (especially data traffic) per virtual domain. (and if possible on one page)

Does somebody know a way to achieve this?

Thanks in advance!

- Jasper

_______________________________________________________






Reply to: