Setup AWSTATS on OS X Tiger Server is plain easy. Check this link for step by step setup
http://www.afp548.com/article.php?story ... 3205258972
But there is one thing bite me - the Apache log format. Apache's default combined log format is like this:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
So I followed the AWSTATS setup instruction to use the combined format for my virtual domain, and watch the log format while browsing the virtual website, the first column of log line always shows the virtual domain server IP instead of visiting IP. Used the same combined log format on OS X Tiger client, no problem at all. After digging around, I found out that Tiger server use "%{PC-Remote-Addr}i" to replace "%h" as the visiting IP. The combined log format on Tiger Server should be like this:
LogFormat "%{PC-Remote-Addr}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
There is no documentation mentioned about this as I search around, Apparently, Tiger is trying to do good thing, but on the contrary bite us.
I did not run the awstats configure script to make changes to apache config file. just manually edit a httpd_awstats.conf and include it in httpd.conf. I also copied awstats.model.conf to awstats.virtualdomain.conf , changed the "LogFile", "SiteDomain", "HostAlias" parameter to match the virtual domain and run the update script:
/Library/WebServer/awstats/tools/awstats_updateall.pl -awstatsprog=/Library/WebServer/awstats/wwwroot/cgi-bin/awstats.pl now
To view the virtual domain awstats, the link should be like this:
http://myhost/awstats/awstats.pl?config=SiteDomain
http://www.afp548.com/article.php?story ... 3205258972
But there is one thing bite me - the Apache log format. Apache's default combined log format is like this:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
So I followed the AWSTATS setup instruction to use the combined format for my virtual domain, and watch the log format while browsing the virtual website, the first column of log line always shows the virtual domain server IP instead of visiting IP. Used the same combined log format on OS X Tiger client, no problem at all. After digging around, I found out that Tiger server use "%{PC-Remote-Addr}i" to replace "%h" as the visiting IP. The combined log format on Tiger Server should be like this:
LogFormat "%{PC-Remote-Addr}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
There is no documentation mentioned about this as I search around, Apparently, Tiger is trying to do good thing, but on the contrary bite us.
I did not run the awstats configure script to make changes to apache config file. just manually edit a httpd_awstats.conf and include it in httpd.conf. I also copied awstats.model.conf to awstats.virtualdomain.conf , changed the "LogFile", "SiteDomain", "HostAlias" parameter to match the virtual domain and run the update script:
/Library/WebServer/awstats/tools/awstats_updateall.pl -awstatsprog=/Library/WebServer/awstats/wwwroot/cgi-bin/awstats.pl now
To view the virtual domain awstats, the link should be like this:
http://myhost/awstats/awstats.pl?config=SiteDomain