Getting AWStats to see mod_gzip data from Apache logs

I'm having a hell of a time trying to get some file deflation statistsics to show up in AWStats considering I had added mod_gzip and changed my Apache log format to include such data. I must say, hacking httpd.conf and an awstats conf file is pretty arcane stuff if you don't understand the terms being thrown around. Let me also say that it appears Safari 2.0.3 is unable to view AWStats reports if you have BuildReportFormat=xhtml set. For now, use BuildReportFormat=html if you're using a Mac to administer stats. Zope.org has a good tutorial on getting mod_gzip initially installed, although the example uses the "common" format. I use "combined". Well, I hacked together

LogFormat="%host %other %logname %time1 %methodurl %code %bytesd %refererquot
%uaquot %other %other %gzipin %gzipout"

in the AWStats conf file for one of my sites since my entry in httpd.conf says

LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"
mod_gzip: %{mod_gzip_result}n In:%{mod_gzip_input_size}n
Out:%{mod_gzip_output_size}n:%{mod_gzip_compression_ratio}npct." combined-gzip

The old addage goes, "RTFM" which I probably should have done first. And, to my chagrin, the proper syntax is found on the AWStats FAQ page. Silly me. Unfortunately, I still can't get any mod_gzip stats out my logs. It USED to work. Anyone have any ideas? Here is an example line from my Apache log:

xxx.xxx.xxx.xxx - - [07/Apr/2006:12:04:34 -0700] "GET / HTTP/1.1" 200 2064 "-"
"Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/418 (KHTML, like Gecko)
Safari/417.9.2" mod_gzip: OK In:4978 Out:1670:67pct.

Comments

2 responses to “Getting AWStats to see mod_gzip data from Apache logs”

  1. Nice, I have been using Wildcard DNS where http://anything.domain.com/ shows the same file. Like in eLawyerShop and in Action Online. Since all subdomains are showing the same file, the file reads the URL and serves dynamic content based on the subdomain written. I got a problem though, I cannot seem to make AWStats get the stats on the subdomains and I cannot seem to find how so all it reads is the stats for the root url of the domain.

  2. Nice, my previous comment shows icons that I used FF on WinXP. Now it will be different. LOL

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.