Setting up of AWStats in a different Web Server – PART 1

What is AWStats?

awstats.sourceforge.net describes it as

AWStats is a free powerful and featureful tool that generates advanced web server statistics, graphically. This log analyzer shows you all possible information your log contains, in few graphical web pages.

A sample graphical report is available here. Follow the below steps to setup AWStats in a web server  ( henceforth called as ‘AWStats Server‘) to create graphical statistics of a different Web Server (henceforth called as ‘Web Server’) and how to automate the process.

Pre-requisites:

A. Setup of IIS Logging on ‘Web Server’

  1. Start the Internet Information Services Manager. To do this, click Start, point to Administrative Tools, and then click Internet Information Services.
  2. Double-click your server_name, where server_name is the name of the server.
  3. Expand the Web Site folder.
  4. Right-click the Web site for which you want to turn on logging, and then click Properties.
  5. On the Website tab, select Enable Logging.
  6. Select a format in the Active log format list as “W3C Extended Log File Format”
  7. Click Properties, click the Advanced tab, and then select the below items

Note: If IIS logging is already enabled, move all existing log files to a different location, then enable above settings. In order to ensure that new format is enforced, restart IIS.

  • Point B and C will enable AWStats Server to run PERL programs through IIS

B. Setting up of PERL on ‘AWStats Server’

  1. Download and install MSI Windows Installer of Active Perl Community Edition http://www.activestate.com/activeperl/downloads. Check c:\Perl64\bin\hello.pl to ensure working of Perl scripts.
  2. Open up your IIS Manager (Start > Run > inetmgr) and go to the Web Service Extensions folder. Right click on the “Web Service Extension” folder and choose “Add a new Web service extension…”
  3. Add the title “Perl” and then click “Add…” to add a path to the Perl executable.
  4. Browse to the C:\Perl directory to pick up the Perl executable and add the following path (including the environment variable): C:\Perl\bin\perl.exe “%s” %s
  5. Choose “Set extension status to Allowed” option
  6. If you get the following message, remove the variable that is already in use (most likely the %s without the quotes).
  7. Final check, ensure “Perl” extension is allowed in ‘Web Service Extension’

C. Configure IIS on ‘AWStats Server’ to run PERL extensions

  1. Create a Virtual directory named “skapadmin1”
  2. Set Virtual directory access permissions to run scripts (such as ASP) and execute (such as ISAPI applications or CGI)
  3. Go to the “Web Sites” folder in the IIS Manager and right click on “skapadmin1” virtual directory and select Properties. Then select the “Home Directory” tab and then select “Configuration…” (in the “Applications Settings” section).
  4. Add the following if .pl extension is not available

AWStats is a free powerful and featureful tool that generates advanced web, streaming, ftp or mail server statistics, graphically. This log analyzer works as a CGI or from command line and shows you all possible information your log contains, in few graphical web pages.

Leave a Reply