This tutorial is written by TheLinker. A Member of the Aprelium forums.
Original Source:

Advanced web server statistics with AWStats



Last year I was involved in a project to help out a web administrator analyzing his Apache log files. We ended up using AWStats, a great web server log analyzer, that shows all kind of information from the web server log. AWStats is a perl script and can be run in CGI mode and from command line. Some months after this project, I tested AWStats on the log files generated by Abyss. This worked out great after some minor adjustment to the Abyss configuration... and here is how I did it.

The Installation

This section explains one way of installing AWStats... which worked for me. :)

  1. Download the latest stable version from At this time it is version 5.3.
  2. Make sure you have configured Abyss to run perl script, as described on
  3. Open the Abyss Console and go to Server Configuration > Advanced > Server Parameters. Set Extended Logging Format to Yes. If this is already done, and you are sure the Abyss log only contains data in the extended logging format... skip the next instruction.
  4. Delete your current Abyss log files, as you need to get access information in the extended logging format.

Now it's time to install AWStats. In this tutorial I use c:\awstats as the program directory for AWStats. Unzip the archive to your c:\ drive. Rename the directory c:\awstats-5.3 to c:\awstats. If done correctly, you should see 3 directories inside your c:\awstats...: docs, tools and wwwroot. Do the following within your c:\awstats directory...:

  1. Create 1 new directory called data.
  2. Rename the wwwroot directory to www.
  3. Move the contents of the directory c:\awstats\www\cgi-bin\ to the c:\awstats\www\ directory. After this your c:\awstats\www\cgi-bin\ should be empty, and you can delete this directory.

Inside your c:\awstats\www directory, you should see the following directories and files...: icon, lang, lib, plugins, and awstats.model.conf.

Now it's time to make a configuration for your site.

The AWStats Configuration

I am not an expert in all the configuration details on AWStats, so I'll just describe the basics.

Make a copy of the file awstats.model.conf and call it e.g. Change the part of the filename to what your site name is... e.g. It's just a filename, so don't worry about the site name being registered.

Open the newnamed conf file in your favourite notepad editor. Look for the following sections in the file, and change accordingly:

# Set this to the location of your log file... e.g.
LogFile="C:/Program Files/Abyss Web Server/log/access.log"

# Remember we changed the log format for Abyss. This is why.

# This is the storage directory for the statistical data.

# We need to make an alias later, in the Abyss configuration.

# A path to the AWStats icons.

# Set this to your site name... e.g.

# This makes it possible to update the statistics from the browser. Allowing the stats to be updated from the browser is not a recommended solution. Use instead some scheduling tools and run the script e.g. once a day.

Save the config file, and keep on reading for the final preparation...

The Final Preparation

Now we need to make this perl script accessible from the web. Open the Abyss Console and go to Server Configuration > Advanced > Aliases. Create a new alias, where virtual path is /awstats and real path is c:\awstats\www. It's time to access the statistics for the first time.

Open your web browser and enter: You must of course enter your site name, and the name of your conf file. In the page being generated, you should see a link called Update now. Click this link to update the statistical data.

If you deleted your current log file, you will not see much data for now. But if your site is frequently visited, you will soon see alot of information about your visitors.

As I wrote earlier, I'm not an expert on AWStats. Read the included documentation and conduct your own experiments with the conf files.

Best of regards...

Valid HTML 4.01!