Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


March 2005

Analyzing Web Statistics with AWStats

This exceptionally robust package runs on Windows
RSS
Subscribe to Windows IT Pro | See More Internet Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Download the Code Here

Somewhere, right now, there's a person on the Internet looking for a solution, an answer to a question, or a means to fill a need. The words that the person enters into the search engine will dictate the results that are returned and the links that the person will follow. With the right words, your Web site might be in that list of results. With the wrong words, it won't. Do you know which keywords people have used to find your Web site in the past? Do you know which keywords most frequently lead them to your Web site?

Web analysis tools aren't new, but I'm still amazed by them. The sheer processing and data-mining power available in a comprehensive Web analysis package is truly remarkable. Need to know how your clients are finding you? Simple—just look in the Web log analysis to see which search phrases they used to get to your site. Need to know whether most of your visitors are running Windows 2000, Windows 98, Apple Computer's Mac OS-X, or Linux? Again, Web analysis software can quickly deliver this type of information. But what if your company doesn't have the budget for this kind of software? Fortunately, there's an exceptionally robust Web analysis package available in the open source community—and it runs on Windows.

AWStats was first created in May 2000 by Laurent Destailleur, a computer engineer in Paris. Laurent had to regularly report his company's Web statistics. He needed a better application than what was available in the open-source world at that time, so he created his own. Laurent first posted his Perl source code on SourceForge.net in October 2000, and the project has grown ever since. As of this writing, AWStats stands at version 6.2 and is an exceptionally reliable and trusted log analysis tool. AWStats can run as a command-line application or as an interactive component of a Microsoft IIS Web server. It can give you a thorough view of who is visiting your Web site.

For the purposes of walking through a sample AWStats setup, I'll be using Win2K Server configured with default IIS settings. Thus, the path to the Web site I'll analyze will be C:\Inetpub\wwwroot and the log files will be in the standard C:\WINNT\System32\LogFiles directory.

Step 1. Customize IIS
The only item you need to customize in IIS is the logging format. The default IIS logging format doesn't provide enough detail for AWStats, so you need to configure IIS to store its logs in the World Wide Web Consortium (W3C) extended log format. To do so, open the Microsoft Management Console (MMC) Internet Information Services snap-in. Right-click the Web site for which you want to change the logging, and select Properties. In the Default Web Site Properties dialog box, select W3C Extended Log File Format from the Active log format drop-down list. Next, click the Properties button to open the Extended Logging Properties dialog box. In this dialog box, make sure the following properties are selected:

  • date
  • time
  • c-ip
  • cs-username
  • cs-method
  • cs-uri-stem
  • cs-uri-query
  • sc-status
  • sc-bytes
  • cs-version
  • cs(User-Agent)
  • cs(Referer)

No other properties should be selected. AWStats has a particular format it looks for, so any variance might produce unpredictable results.

To make sure that all your logs will be in the correct format, you should delete or archive any previous logs that might have been generated by IIS. If IIS is currently running, you might not be able to remove the current day's log because it'll probably be in use. In that case, simply stop the World Wide Web Publishing service on your system, remove the open file, then restart the service.

Step 2. Install ActivePerl and AWStats
To use AWStats, you need to install ActiveState's ActivePerl and AWStats on your server. You can download ActivePerl from ActiveState's Web site at http://www.activestate.com/products/activeperl. As of this writing, ActiveState offers two releases: ActivePerl 5.8.6 and ActivePerl 5.6.1. I've found that ActivePerl 5.6.1 works fine with AWStats and provides better compatibility with some other Perl open-source tools I like to use. So, if you think you might want to try some other open-source Perl applications, I recommend that you install ActivePerl 5.6.1. If you prefer to have the latest version, AWStats also works with ActivePerl 5.8.3. Feel free to download whichever version suits your needs.

To install ActivePerl, you need Windows Installer. The ActivePerl installation is rather straightforward. There are no real options from which to choose, other than the installation path. I recommend that you install ActivePerl in the AWStats default installation path, which is C:\Program Files\AWStats.

After you've installed ActivePerl, you need to download the main AWStats distribution from the SourceForge.net project site at http://awstats.sourceforge.net. There's a self-installing executable available for easy installation. After you download the AWStats executable, simply launch the .exe file and accept the default installation path. When the installation is complete, the application will be in C:\Program Files\AWStats.

Step 3. Configure AWStats
As a part of the setup process, AWStats launches its own configuration program, a Perl application that executes in a command window. The configuration application first asks for the path to your Web server configuration file, as Figure 1 shows. The configuration application assumes that you're using a Web server, such as Apache, that's configurable through a text file. Because IIS isn't configured in this manner, simply enter none.

After attempting to configure your Web server, the configuration program walks you through building a basic configuration template for your Web site. As Figure 2 shows, it first asks whether you want to create a new AWStats configuration file. Answer yes. Next, the configuration program asks you to provide a name for the Web site you'll be analyzing. I've selected the name www.toombspartners.com—the name of the domain for the fictitious organization Toombs Partners—as the Web site name. The program uses the name you provide to create the filename for the configuration file. In this case, the program will name the file awstats.www.toombspartners.com.conf.

   Previous  [1]  2  3  Next 


Reader Comments
Great tutorial. Thanks! AWStats gives a wealth of info. This article alone is worth the price of my subscription.

stylistic500 March 31, 2005 (Article Rating: )


You must log on before posting a comment.

If you don't have a username & password, please register now.




Learning Path To learn more about AWStats:
"http://awstats.sourceforge.net"


Top Viewed ArticlesView all articles
Microsoft: Save Money ... By Paying for Software

Microsoft this week adopted an interesting tactic in its long-running battle with open source software: Businesses looking to save money over the long haul should simply pay for software instead of moving to free, open source solutions. The rationale? ...

PsExec

This freeware utility lets you execute processes on a remote system and redirect output to the local system. ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Related Events How IE7 & The New Extended Validation SSL Certificates Impact Your Site

Concrete Ways to Make Sure Your SharePoint Deployment Doesn't Blow Up

Virtualization Management

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

Keeping Your Business Safe from Attack: Monitoring and Managing Your Network Security

Related IIS and Web Administration Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing