Litespeed - AWstats setup and configuration

Efficient and clean analysis of website statistics is a powerful tool for any webmaster.

AWstats is pretty much the 'de-facto' in analysing website data and is integrated into the Litespeed Web Server and , as you would expect, setting up and securing AWstats is quick and easy with Litespeed.

There are three of assumptions to be made before continuing with this article.

Firstly, as we are now doing something with the domain that needs to be separate from other virtual hosts, you need to ensure it has been instantiated. Please see the Instantiate a Virtual Host article for details.

Secondly, when you installed Litespeed you selected 'Y' when asked:

Would you like to install AWstats Add-on module [y/N]?

If you selected 'N' during the install (which is the default choice) you can go through the process of installing Litespeed again but select 'Upgrade' instead of install. This will keep any settings but you will have the choice of adding AWstats.

Finally, as the AWstats directory needs to be password protected, you have a working .htpasswd entry. To set this up, please see the password protection article.

AWstats setup

To setup AWstats, log into the Litespeed Admin Area and select the relevant Virtual Host.

Notice the last tab to the right called "Add-ons":

Selecting this tab will give you two add-ons to configure. Front Page Server Extensions and AWStats Integration:

Click the AWStats Integration 'Edit' link. Most of the field are self explanatory but let's go through them:

Update Mode: I choose dynamic here as I like to keep records for previous months and to have the added choices of a navigation panel in the AWstats report.

Working Directory: When I create my virtual host layout I have a directory named 'awstats' along with the 'public' and 'config' directories, etc. This directory is above the public root folder and can, of course, be called whatever you like.

AWStats URI: This is the URI, or website address, where you will access the AWstats report. In this example I have chosen 'sitestats' so I would access the report via http://mydomain.com/sitestats. For a little more security choose something other than 'sitestats' or 'awstats'.

Site Domain and Site Aliases: This is the URI of the domain and any aliases. For example, domain.com and www.domain.com.

Update Interval: How often do you want the report to be updated? Daily or hourly.

Update Offset (secs): By default the report is updated on the hour, every hour (or daily if you chose a daily interval). However, if you have a few sites on your server, it may be an idea to spread the load over a period of time. I have chosen 60 seconds here so the report will be updated at 1 minute past the hour, every hour.

Secured Connection: Whether you access the stats via an SSL connection or not. This has nothing to do with password protected directories.

Authentication Realm: It is very unlikely you will leave this blank as you will not want everyone accessing intimate website statistics. Simply select the htpasswd realm that was setup previously. See the password protection article for details.

My example setup looks like this:

Save your settings (Litespeed will give a warning if the 'awstats' directory does not exist), Apply Changes and Gracefully Restart the server.

Navigate to the URI, eg:

http://www.mydomain.com/sitestats

Enter the protected realm username and password and you will be presented with the AWstats report.

PickledOnion.

Digg it | del.icio.us | reddit | StumbleUpon

Comments are closed for this article.