Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  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 


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


Top Viewed ArticlesView all articles
Command Prompt Tricks

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

WinInfo Short Takes: Week of November 23, 2009

An often irreverent look at some of the week's other news, including some post-PDC some soul searching, a Google Chrome OS announcement and a Microsoft response, Windows 7 off to a supposedly strong start, the Jonas Brothers and Xbox 360, and so much more ...

2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...


IIS and Web Administration Whitepapers Best Practices for SharePoint Backup & Recovery

Meeting Compliance Objectives in SharePoint

Improve SharePoint Performance for Remote Workers

Related Events Deep Dive into Windows Server 2008 R2 presented by John Savill

Managing IT Across Multiple Locations

The Easiest Way to Save Time and Money on E-mail and SharePoint Management

Check out our list of Free Email Newsletters!

IIS and Web Administration eBooks Web Filtering: An Assessment

Understanding and Leveraging Code Signing Technologies

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

Related IIS and Web Administration Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


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 DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement