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.
A. Setup of IIS Logging on ‘Web Server’
- Start the Internet Information Services Manager. To do this, click Start, point to Administrative Tools, and then click Internet Information Services.
- Double-click your server_name, where server_name is the name of the server.
- Expand the Web Site folder.
- Right-click the Web site for which you want to turn on logging, and then click Properties.
- On the Website tab, select Enable Logging.
- Select a format in the Active log format list as “W3C Extended Log File Format”
- 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’
- 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.
- 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…”
- Add the title “Perl” and then click “Add…” to add a path to the Perl executable.
- 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
- Choose “Set extension status to Allowed” option
- If you get the following message, remove the variable that is already in use (most likely the %s without the quotes).
- Final check, ensure “Perl” extension is allowed in ‘Web Service Extension’
C. Configure IIS on ‘AWStats Server’ to run PERL extensions
- Create a Virtual directory named “skapadmin1”
- Set Virtual directory access permissions to run scripts (such as ASP) and execute (such as ISAPI applications or CGI)
- 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).
- Add the following if .pl extension is not available