Forum OpenACS Q&A: Bit OT: Webalizer with Subdomains...

Collapse
Posted by David Kuczek on
I have Webalizer installed with my OpenACS installation. Up until now, one statistics file was enough for me, but lately some clients wanted to have their own statistics file in order to see exactly how many visits, pages, etc. they have on their subdomain... The AOLServer log file provides this information, but how can I configure Webalizer to show them to me?

Thanks

Collapse
Posted by David Kuczek on
I just found out that one possibility is to grep all log entries associated with a specific subdomain on the fly and subsequently letting webalizer analyze that file:

"cat /var/log/httpd/access_log | grep -i foo.com | grep `date '+%d/%b/%Y'` >> ~/foo.access.log; webalizer -c ~/foo.webalizer.conf"

It "kinda" works. It's weird though that people that retrieved a page generated "Pages" but not *always* "Visits"! Is it possible that the grep command doesn't get all the necessary log entries for webalizer?

Collapse
Posted by Randy O'Meara on
Another possibility is to create and roll site-specific access logs using the multilog facility that is included with daemontools.
Collapse
Posted by Mark Aufflick on
Not that this answers your question, but I use Apache (and it's mod_proxy) as the first line reverse-proxy server. It can be configured to produce a seperate log file per site, and there are many different log analyzers that work well with Apache logs.

As to your situation, my approach would be to write a perl script to split the file into a seperate log file for each subdomain and run webalizer on them. That way you can also keep your single log file and keep producing the whole-server stats you have now.