Forum

Awstats Logging Revisted

s0ck3t
3 June 2010, 20:08
Hugo,

Was the logging issue with Awstats resolved? I'm experiencing the same issue noted in this post...http://www.hiawatha-webserver.org/forum/topic/225.

I have the following settings:
Awstats: LogFormat = 1
Hiawatha: LogFormat = extended

Hiawatha version: 7.2
Operating System: Ubuntu 10.04
Hugo Leisink
3 June 2010, 20:24
Yes, it was resolved. Can you show me what log line is causing problems?
s0ck3t
4 June 2010, 05:15
Here's the return message...

perl /usr/local/awstats/awstats_updateall.pl now
Running '"./awstats.pl" -update -config=www.my-website.com -configdir="/etc/awstats"' to update config www.my-website.com
Create/Update database for config "/etc/awstats/awstats.www.my-website.conf" by AWStats version 6.9 (build 1.925)
From data in log file "/var/log/hiawatha/access.log"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
AWStats did not find any valid log lines that match your LogFormat parameter, in the 50th first non commented lines read of your log.
Your log file /var/log/hiawatha/access.log must have a bad format or LogFormat parameter setup does not match this format.
Your AWStats LogFormat parameter is:
1
This means each line in your web server log file need to have "combined log format" like this:
111.22.33.44 - - [10/Jan/2001:02:14:14 +0200] "GET / HTTP/1.1" 200 1234 "http://www.fromserver.com/from.htm" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"
And this is an example of records AWStats found in your log file (the record number 50 in your log):
80.129.116.141|Mon 31 May 2010 08:19:41 +0200|200|6199||GET /images/icons/weblog.png HTTP/1.1|Host: www.my-website|Connection: keep-alive|Referer: http://www.my-website.com/admin|Accept: */*|User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.9 (KHTML, like Gecko) Chrome/6.0.401.1 Safari/533.9|Accept-Encoding: gzip,deflate,sdch|Accept-Language: en-US,en;q=0.8|Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Hugo Leisink
4 June 2010, 09:10
It looks like that the first entries of your logfile have been filled with log lines in Hiawatha's native format. You should remove those from your logfiles.
s0ck3t
4 June 2010, 14:34
Got it; that was actually my next move, but wanted to get your response before proceeding.

Thx!

Hiawatha rocks!
This topic has been closed.