Skip to content. | Skip to navigation

Personal tools
Sections
You are here: Home wiki WebLogAnalysis

WebLogAnalysis

AWStats evaluation:

  1. Install

    AWStats comes with adequate though sometimes cryptic "Install, Setup and Use" instructions, I'd like to refine them somewhat. Installation on Windows appears straight forward, but failed in my case by not creating awstats.myhost.conf, and not uncommenting CustomLog logs/access.log combined in the Apache httpd.conf file (necessary so AWStats can report on all details). When making my host version of awstats.model.conf (made a copy calledawstats.myhost.conf) have to make the bare minimum configuration entries as follows;

    • LogFile="C:\Program Files\Apache Group\Apache2\logs\access.log"
    • SiteDomain="localhost"
  2. Setup (also a basic test that the install was correct)

    From the command line awstats.pl -config=galliano -update works nicely but needs all the other output options to be run for completeness example of output below:

        C:\Program Files\AWStats\wwwroot\cgi-bin>awstats.pl -config=myhost -update
        Update for config "C:\Program Files\AWStats\wwwroot\cgi-bin/awstats.myhost.conf"
        With data in log file "C:\Program Files\Apache Group\Apache2\logs\access.log"...
    
        Phase 1 : First bypass old records, searching new record...
        Direct access after last parsed record (after line 16)
        Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...
        Jumped lines in file: 16
         Found 16 already parsed records.
        Parsed lines in file: 61
         Found 0 dropped records,
         Found 0 corrupted records,
         Found 0 old records,
         Found 61 new qualified records.
    

     

    What this script does is update the database that AWStats builds from the web log files, I think the database file is called awstats092004.myhost.txt. To see web stats reports built from this database we need to go to Step 3

  3. Use - Read Statistics (also tests the install and setup was correct)

    Running awstats as follows creates a html report page awstats.pl -config=myhost -output -staticlinks >awstats.myhost.html

    By copying awstats_buildstaticpages.pl from the tools directory into the cgi-bin directory and running it as follows awstats_buildstaticpages.pl -config=myhost it generated the full suite of report pages. However you won't be able to create the PDF versions of these reports unless you have installed a "htmldoc" program.

  4. The next step is to try and get it working in your webserver.

    Not just the static HTML page, but the cgi generated user initiate page. To do this focus on getting it working from a bare Apache installation first, then deploy it on your webserver.

  5. Apache changes may be required, i.e. to use combined format for the access.log:
        # The following directives define some format nicknames for use with
        # a CustomLog directive (see below).
        #
        LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
        LogFormat "%h %l %u %t \"%r\" %>s %b" common
        LogFormat "%{Referer}i -> %U" referer
        LogFormat "%{User-agent}i" agent
        # AH commented in 'combined' as per the default required by AWStats
        CustomLog logs/access.log combined
    
  6. Reporting on a lot of log data (i.e. months/years).