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

Re: Webalizer + two domains



Mike Chambers said:
> Is there a way to use webalizer, or configure it, to monitor two domains
> on a box instead of just the total?
>
Yes, I have been doing it for the past month. I take it you have Apache
set up for virtual domains?

> As in right now, I have both my domains pointing to one access/error log
> (/var/log/httpd/access_log), but would rather them point to their own
> and have webalizer monitor both.  What I mean by both, as in maybe two
> sites for both such as www.mydomain.com/usage/mydomain.html and
> www.mydomain2.com/usage/mydomain2.html or something similar?
>
It seems like the recommended solution is to log each domain in a separate
log. For example, my default domain logs to /var/log/httpd/access_log. My
second "virtual domain" logs to /var/logs/httpd/second_domain_access_log.
You can define this in the <VirtualHost> container like this:
CustomLog /var/log/httpd/second_domain_access_log
ErrorLog /var/log/httpd/second_domain_error_log

Then you create a copy of webalizer's config (/etc/webalizer.conf) for the
second domain. Edit the file and tell it where your second domain's log
file is at. Also change the OutputDir, HistoryName and IncrementalName to
something other than where it defaults to (that way you don't skew your
default domain's history).

Finally edit /etc/cron.daily/00webalizer and copy the three lines
currently in there directly below it. On the second entry change
/usr/bin/webalizer to /usr/bin/webalizer -c
/etc/<name_of_second_webalizer>.conf (of course changing
name_of_second_webalizer to whatever the name of the copy you created in
an earlier step.)

Hope this helps.

Eric



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