Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Apache, Cronolog and Webalizer

brisraybrisray Member Posts: 60
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 - http://cronolog.org/

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 - http://www.mrunix.net/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:apachelogsaccess.log
LogType clf
OutputDir D:risraywebstats
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?

Ray

Comments

  • brisraybrisray Member Posts: 60
    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.

  • brisraybrisray Member Posts: 60
    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
    LogType Combined
    OutputDir
    HistoryName webalizer.hist
    Incremental yes
    IncrementalName webalizer.current
    ReportTitle Usage Statistics for
    HostName
    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 http://www.plus.net/support/webspace/webstats_logs.shtml

    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

Sign In or Register to comment.