AWStats

 
 
AWStats (Advanced Web Statistics) is a free powerful and featureful tool that generates advanced web, ftp or mail server statistics, graphically. This log analyzer works as a CGI or from command line and shows you all your web statistics including: visitors, pages, hits, hours, search engines, keywords used to find your site, broken links, robots and many more in few graphical web pages.

AWStats is released under the GNU General Public License (GPL).

AWStats analyzes the following log files:
  • IIS (W3C log format)
  • Apache log files (NCSA combined/XLF/ELF log format or common/CLF log format)
  • WebStar
  • Most of all web, proxy, wap, streaming servers (and ftp servers or mail logs)
The latest AWStats version can be downloaded from: http://awstats.sourceforge.net/







Installing AWStats 6.1 and create report.



Information
This guide explains how to run AWStats from the command line.

Operating system used
Windows XP Home Edition Version 5.1 SP 2

Software prerequisites
Perl 5.005_03 or higher

Procedure
  1. Download and execute awstats-61.exe.

    AWStats setup.

  2. Press Next button and read license.

    AWStats license.

  3. Press I Agree button and choose the location where AWStats should be installed.
    For example: C:\Tools\AWStats

    AWStats install location.

  4. Press Install button. A DOS window will be opened and the following messages will be displayed:

    ----- AWStats configure 1.0 (build 1.32) (c) Laurent Destailleur -----
    This tool will help you to configure AWStats to analyze statistics for
    one web server. You can try to use it to let it do all that is possible
    in AWStats setup, however following the step by step manual setup
    documentation (docs/index.html) is often a better idea. Above all if:
    - You are not an administrator user,
    - You want to analyze downloaded log files without web server,
    - You want to analyze mail or ftp log files instead of web log files,
    - You need to analyze load balanced servers log files,
    - You want to 'understand' all possible ways to use AWStats...
    Read the AWStats documentation (docs/index.html).

    -----> Running OS detected: Windows

    -----> Check for web server install
       Found a Web server Apache install in 'C:\Tools\Apache Group\Apache2'

    -----> Check and complete web server config file 'C:\Tools\Apache Group\Apache2/conf/httpd.conf'
       Add 'Alias /awstatsclasses "C:/Tools/AWStats/wwwroot/classes/"'
       Add 'Alias /awstatscss "C:/Tools/AWStats/wwwroot/css/"'
       Add 'Alias /awstatsicons "C:/Tools/AWStats/wwwroot/icon/"'
       Add 'ScriptAlias /awstats/ "C:/Tools/AWStats/wwwroot/cgi-bin/"'
       Add '<Directory>' directive
       AWStats directives added to Apache config file.

    -----> Update model config file 'C:/Tools/AWStats\wwwroot\cgi-bin\awstats.model.conf'
       File awstats.model.conf updated.

    -----> Need to create a new config file ?
    Do you want me to build a new AWStats config/profile
    file (required if first install) [y/N] ?
    Enter y

    -----> Define config file name to create
    What is the name of your web site or profile analysis ?
    Example: www.mysite.com
    Example: demo
    Your web site, virtual server or profile name:
    >
    Enter for example www.mobilefish.com

    -----> Create config file 'C:/Tools/AWStats\wwwroot\cgi-bin\awstats.www.mobilefish.com.conf'
    Config file C:/Tools/AWStats\wwwroot\cgi-bin\awstats.www.mobilefish.com.conf created.

    -----> Restart Apache with '"C:\Tools\Apache Group\Apache2/bin/Apache.exe" -k restart'
    Restart Apache



  5. After Apache is restarted, close the DOS window.

    AWStats build config

  6. Press the Show Details button to show what has happened.

    AWStats build config

  7. Press the Close button to finish the FIRST step of the installation.

  8. AWStats has added at the end of the Apache httpd.conf file the following lines:

    EnableSendfile Off
    Win32DisableAcceptEx On
    #
    # Directives to allow use of AWStats as a CGI
    #
    Alias /awstatsclasses "C:/Tools/AWStats/wwwroot/classes/"
    Alias /awstatscss "C:/Tools/AWStats/wwwroot/css/"
    Alias /awstatsicons "C:/Tools/AWStats/wwwroot/icon/"
    ScriptAlias /awstats/ "C:/Tools/AWStats/wwwroot/cgi-bin/"

    #
    # This is to permit URL access to scripts/files in AWStats directory.
    #
    <Directory "C:/Tools/AWStats/wwwroot">
    Options None
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>


  9. Go to C:\Tools\AWStats\wwwroot\cgi-bin and edit file:
    awstats.www.mobilefish.com.conf

    You must edit this file according to your situation. Here below are some parameters which you should pay attention.

    LogFile="C:/mobilefish_logs/access.log"
    LogFormat=1
    SiteDomain="www.mobilefish.com"
    DNSLookup=0
    DirData="C:/mobilefish_logs/awstats_data_dir"
    AllowFullYearView=3

  10. In a DOS window type:
    perl awstats.pl -update -config=www.mobilefish.com

    You will see something like this:
    Update for config "./awstats.www.mobilefish.com.conf"
    With data in log file "C:/mobilefish_logs/access.log"...
    Phase 1 : First bypass old records, searching new record...
    Searching new records from beginning of log file...
    Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...
    Jumped lines in file: 0
    Parsed lines in file: 74806
    Found 2 dropped records,
    Found 49309 corrupted records,
    Found 0 old records,
    Found 25495 new qualified records.


    Note 1: The awstats.pl file processes the webserver log file (see LogFile parameter in awstats.www.mobilefish.com.conf) and creates a data file containing the web statistics. The data file location is specified by parameter DirData (see DirData parameter in awstats.www.mobilefish.com.conf).

    Note 2: You need to run this command each time if a new webserver log file is available.

  11. You can now generate one or more reports files. In this example all report files are generated. A dos batch file has been created to automate the process. Download create_awstats_log_report.bat file.

    AWStats sample report

    Note 1: All generated report files can be found at
    C:\Tools\AWStats\wwwroot\cgi-bin\awstats.www.mobilefish.com.xxx.html

    Note 2: The main report file is called awstats.www.mobilefish.com.html