minitutorials main logo the place to learn online

Sponsor This Site!
Sponsorship Details - miniTutorials is taking enquiries into various Sponsorship opportunities. Available NOW! Read More on our Sponsorship page.
This Page Sponsored by :
Proudly Sponsored by Your Company name here!
miniTutorials Sponsorship
Donate!
Consider donating to keep this site alive and up to date. Click on the Donate button to go straight to PayPal site and make a donation of an amount you choose.


More information on where the money goes on the Donations page.
Discussion Forums
visit the mini tutorial forums
For expert help and advice on any of our Tutorials or anything else .... visit the forums and ask away!!
Google Ads
My Profile

Details about the owner of this site can be found at :-

ohloh profile
View Gavin McDonald's profile on LinkedIn
Powered by a
UK2 Dedicated Server

Apache Web Server.

ActivePerl and AWStats Installation Instructions.

Intermediate Level

ActivePerl and AWStats Installation Instructions.

apache php mysql & awstats combined logos

Steps 3 and 4- Download and install AWStats.


Step 3: Download the latest version of AWStats.

Goto http://awstats.sourceforge.net or http://www.awstats.org and download the latest STABLE release - currently awstats-6.4.exe (875KB) and is the one config settings used here are for.

 

 

Step 4: Install and Configure AWStats.

To Configure AWStats for your Site/Server/ActivePerl.

There are two ways of doing this :-

1. Follow the instructions from Step 1 'Install & Setup' which by default appears on your screen after the above install. (Or by looking in C:\Apache2\AWstats\docs\awstats_setup.html)

2. Follow my Quick Setup Instructions below. If doing it this way , maybe take the time to glance at the programs 'Install & Setup' page (as in 1 above) before continuing.


Quick Setup Instructions for AWStats

These instructions assume you have been following the Apache Tutorial and therefore use the setup and directories as described there. Subsitute any directories and file/site names for your own circumstances.

AWStats (and most stat generators) use the log files generated by our Apache server. We configured our Apache server to use the 'combined' method which awstats prefers to use for its site stats.

Just a reminder (or for those that did not follow the Apache tutorials) , our log files are stored in "C:\Apache2\Apache2\logs\" directory and the log file names are based on our site name. So 'yoursite.com' will have two log files named after it called 'yoursite.com-error_log' and 'yoursite.com-access_log'. It is this second log that we need to tell awstats to use, and its location. We do this in a few minutes, first of all we need to move some files around.

Note : Most versions of AWStats from about version 5.8 upwards create alias directory entries in your Apache httpd.conf file (at the bottom) making the above file copying not really neccesary, however I like to keep them where I put them above and remove the httpd.conf entries, so I don't have more than one CGI executable directory, it's entirely up to you.

Thats the copying done, now we need to edit just two files and we are done.

Edit 'awstats.pl' located in "C:\Apache2\Apache2\cgi-bin\" and change just the path on the first line to point to "C:\Apache2\perl\bin\perl.exe" so it should now look like this (it might contain symbols if edited in Notepad so open in Wordpad instead)

#!C:\Apache2\perl\bin\perl.exe

Basically we are pointing the awstats.pl file to our perl.exe program we installed earlier, so if yours is placed elsewhere then change the above file path accordingly - or awstats wont work!
If you glanced down this file briefly and thought 'oh hell, what have I let myself in for here' - don't panic, we have finished with this particular file now and dont need to know any of that stuff! So save and close 'awstats.pl' overwriting the original.

Now find the awstats.yoursite.conf (newly created during the install by AWStats) and open it for editing. (This file is in the same directory/folder as the 'awstats.pl' we just edited a minute ago.)

Within 'awstats.yoursite.com' find and replace the following :-

--------------------------
Main Setup Section
--------------------------

--------------------------
Optional Setup Section
--------------------------

So that you dont include stats from your own local machines, they will remain in the actual log files but excluded from awstats counts - believe me, to get 'true' figures you might like to do the following sometime, but is not essential at this stage.

All done, now all we need to do is take a look at our site stats and check its all working.

Either goto 'http://localhost/cgi-bin/awstats.pl?config=yoursite' in your web browser or 'http://www.yoursite.com/cgi-bin/awstats.pl?config=yoursite' and all your stats you have collected so far for the current month should be showing.

I encourage you to view all the readme files and config options associated with awstats as there is alot more that can be done. The above is to get you going and may be enough for most people.

left arrow depicting to go back Back to Download and install ActivePerl | Forward to Protect your Site Stats! right arrow depicting to go forward


tutorial sponsors logo

About Us | Site Map | Privacy Policy | Contact Us | ©2002 - 2007 miniTutorials.com