Link to home
Start Free TrialLog in
Avatar of it_opswat
it_opswat

asked on

Problem with AWStats for Apache in Windows

Hello everyone,

I'm getting a couple errors with AWStats that I'm not 100% sure what's going on.

The first is it doesn't like my log format... it was set as log format type 1 because it's apache but I realized I had to do a custom.

So here's what my server is logging it as ....

192.168.1.1 - - [01/Sep/2011:09:35:20 -0700] "GET /about.cgi HTTP/1.1" 200 8015

So I have the logformat as

LogFormat= "%host %time1 %methodurl %code %bytesd"

However I'm getting this error


C:\Program Files (x86)\AWStats\wwwroot\cgi-bin>perl awstats.pl -update -config=www.metascan-online.com
Create/Update database for config "./awstats.www.metascan-online.com.conf" by AWStats version 7.0 (build 1.971)
From data in log file "C:\Program Files (x86)\Apache Software Foundation\Apache2.2\logs\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 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\logs\access.log must have a bad format or LogF
ormat parameter setup does not match this format.
Your AWStats LogFormat parameter is:
%host %time1 %methodurl %code
This means each line in your web server log file need to have the following personalized log format:
%host %time1 %methodurl %code
And this is an example of records AWStats found in your log file (the record number 50 in your log):
192.168.1.1 - - [18/Aug/2011:09:19:19 -0700] "GET /img/menu-bg.png HTTP/1.0" 200 3216
Setup ('./awstats.www.metascan-online.com.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).


As you can see I'm throwing some second error at the bottom... I've added permissions to both the logfile as well as the .conf file to make sure that they are readable by everyone.

Any ideas?? Thanks!
Avatar of IanTh
IanTh
Flag of United Kingdom of Great Britain and Northern Ireland image

could it be a permission problem can you explore the log file manually
Your AWStats LogFormat parameter is:
%host %time1 %methodurl %code

It looks like your LogFormat is also defined elsewhere and is missing bytesd parameter which is mandatory for awstats.
Avatar of it_opswat
it_opswat

ASKER

Thanks guys.

And my bad parparov I accidentally pasted the wrong text. I had tried removing %bytesd to test and see what happened but it showed me exactly the same screen but with %bytesd on the end. So I'm pretty sure I built the customformat properly. I can manually read & edit the conf files and everything with the permissions I've set Any other ideas?
See same output with %bytsed in there as well.. I'm kind of at a loss. I don't ever use AWStats on Windows.

 C:\Program Files (x86)\AWStats\wwwroot\cgi-bin>perl awstats.pl -update -config=www.metascan-online.com
Create/Update database for config "./awstats.www.metascan-online.com.conf" by AW
Stats version 7.0 (build 1.971)
From data in log file "C:\Program Files (x86)\Apache Software Foundation\Apache2
.2\logs\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 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\logs\a
ccess.log must have a bad format or LogFormat parameter setup does not match thi
s format.
Your AWStats LogFormat parameter is:
%host %time1 %methodurl %code %bytesd
This means each line in your web server log file need to have the following pers
onalized log format:
%host %time1 %methodurl %code %bytesd
And this is an example of records AWStats found in your log file (the record num
ber 50 in your log):
89.73.151.163 - - [18/Aug/2011:09:19:19 -0700] "GET /img/menu-bg.png HTTP/1.0" 2
00 3216
Setup ('./awstats.www.metascan-online.com.conf' file, web server or permissions)
 may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
ASKER CERTIFIED SOLUTION
Avatar of parparov
parparov
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That was it... Thank you very much my good sir!!