Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache, Cronolog and Webalizer

Status
Not open for further replies.

brisray

Programmer
Feb 7, 2002
88
0
0
US
I'm in the process of setting up a new webserver for myself and this time thought I'd use a web log analyzer.

Operating System - Windows 2000
Web Server Apache 2

I've run into a couple of problems I can't solve.

1) Cronolog -
This is supposed to be able to split the log files from Apache to monthly files. So in httpd.conf I've used

ErrorLog "|C:/Program Files/Cronolog/cronolog D:/apachelogs/%Y%Merror.log"
CustomLog "|C:/Program Files/Cronolog/cronolog D:/apachelogs/%y%maccess.log" combined

Neither seems to work. For the error log apache gives me an error, so when I put that back to the default the access.log gets written to D:/apachelogs without being split.

am I using the right syntax for this to work?

2) Webalizer -
Becaue of the problems with Cronolog the Apache httpd.conf, I've just used a normal path and file name to write the logs. This is a seperate problem.

I used Analog to look at the access.log file and that works fine. Now I'm trying to compareit to Webalizer.

It is installed in C:/Program Files/Webalizer. The webalizer.conf file is in the same folder. I've edited it to read

LogFile D:\apachelogs\access.log
LogType clf
OutputDir D:\brisrayweb\stats
ReportTitle Usage Statistics for
HistoryName webalizer.hist
HostName brisray
HTMLExtension htm

everything else I've kept as in the sample.conf they supplied.

When I run Webalizer I get an error message that says

Hostname for reports is BRISRAYSERVER
History file not found ...

Brisrayserver is the name of the PC. Anyone any idea why this is happening?


I'm not sure whether this belongs in the this or the Web Site Development software forum. So I'm posting it in both. Sorry for the cross-posting but I'm not sure where the problem is, me, Apache or the software I'm trying to use.

Ray
 
Your cronolog problem may be related to your use of long filenames in the invocation of the command.

You might try using "c:/progra~1/..." or whatever is the appropriate short filename for the "Program Files" directory on your system.

You might also take a look at this page. The page is a discussion of a problem with cronolog and long filenames. One of the participants is the person who ported cronolog to Win32.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Thanks, I'll experiment a bit with the file names, quotes and double %%'s and the other stuff mentioned. I think I'm beginning to hate ports from other platforms.

Ray
 
After a lot of messing around with this I found a solution to the cronolog problem.

It seems when you run Apache on Windows it doesn't recognise folder names more than one level deep for any files other than what it needs in its own directory structure. Also, the full program name must be specified.

for example

ErrorLog "|C:/Program Files/Cronolog/cronolog D:/apachelogs/%Y%Merror.log"
CustomLog "|C:/Program Files/Cronolog/cronolog D:/apachelogs/%y%maccess.log" combined

doesn't work, but

ErrorLog "|D:/weblog/cronolog.exe D:/weblog/%Y%merr.log"
CustomLog "|D:/weblog/cronolog.exe D:/weblog/%y%macc.log" combined

does.

I'm still working on the Webalizer problem.
 
I finally got Webalizer to work as well. There is a problem in the default sample.conf file that makes it not work with Windows.

The file below can be used as webalizer.conf

LogFile <your log file name here>
LogType Combined
OutputDir
HistoryName webalizer.hist
Incremental yes
IncrementalName webalizer.current
ReportTitle Usage Statistics for
HostName <your web address here>
HTMLExtension html
PageType htm*
PageType cgi
#DNSCache dns_cache.db
#DNSChildren 20
#Quiet no
#ReallyQuiet no
Debug no
GMTTime yes
CountryGraph no
HourlyGraph yes
HourlyStats yes
GraphLegend yes
GraphLines 2
TopSites 30
TopKSites 10
TopURLs 30
TopKURLs 10
TopReferrers 30
TopAgents 15
TopCountries 0
TopEntry 10
TopExit 10
TopSearch 20
TopUsers 20
AllSites yes
AllURLs yes
AllReferrers yes
AllAgents yes
AllSearchStr yes
AllUsers yes
#IndexAlias home.htm
#IndexAlias homepage.htm
HideURL *.gif
HideURL *.GIF
HideURL *.jpg
HideURL *.JPG
HideURL *.png
HideURL *.PNG
HideURL *.ra
GroupReferrer yahoo.com/ Yahoo!
GroupReferrer excite.com/ Excite
GroupReferrer infoseek.com/ InfoSeek
GroupReferrer webcrawler.com/ WebCrawler
SearchEngine yahoo.com p=
SearchEngine altavista.com q=
SearchEngine google.com q=
SearchEngine eureka.com q=
SearchEngine lycos.com query=
SearchEngine hotbot.com MT=
SearchEngine msn.com MT=
SearchEngine infoseek.com qt=
SearchEngine webcrawler searchText=
SearchEngine excite search=
SearchEngine netscape.com search=
SearchEngine mamma.com query=
SearchEngine alltheweb.com query=
SearchEngine northernlight.com qr=

I found this at
The LogFile and OutputDir both accept folder and drive letters. I used the short file names like D:/weblog for the main logs from Apache. But it does produce the output logs in a folder named D:/brisrayweb/stats.

For some reason Webalizer is happy with that conf file and creates and reads the webalizer.hist file.

I ran the program twice and was a bit disconcerted to see a message saying xxxx records ignored. But I soon realized why this was happening. The history file seems to allow Webalizer to compare what it read and wrote in the previous session and so ignores records it has already processed.

Ray
 
The real answer here was that you added .exe to the cronolog program path. If you do the same for your original statement it should work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top