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
The Memory-Optimization Hoax

Don't believe the hype. At best, RAM optimizers have no effect. At worst, they seriously degrade performance. ...

VMware and the Future of Virtualization

What's next for virtualization and business IT? Windows IT Pro senior editor Jeff James speaks with VMware President and CEO Diane Greene on the future of virtualization technology. ...

What service packs and fixes are available?

...


IIS and Web Administration Whitepapers Extended Validation SSL Certificates

Are You Satisfied?

A Preliminary Look at Deployment Plans for Microsoft Windows Vista

Related Events Check out our list of Free Email Newsletters!

IIS and Web Administration eBooks Keeping Your Business Safe from Attack: Monitoring and Managing Your Network Security

A Guide to DNS and Windows 2000

Building the Small Business Infrastructure

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.


ADS BY GOOGLE SPONSORED LINKS FEATURED LINKS

Critical Challenges of ESI & Email Retention
Are you storing too much electronic information? Get expert legal advice and better understanding of what you are required to do as an IT professional.

Become a fan of Windows IT Pro on Facebook!
Join us on Facebook and be a fan of Windows IT Pro!

Sustainable Compliance: Are You Having a Resource Crisis?
Read this white paper to examine trends in compliance and security management and review approaches to reducing the cost and operational burden of compliance.

Rev Up Your IT Know-How with Our Recharged Magazine!
The improved Windows IT Pro provides trusted IT content with an enhanced new look and functionality! Get comprehensive coverage of industry topics, expert advice, and real-world solutions—PLUS access to over 10,000 articles online. Order today!

Get It All with Windows IT Pro VIP
Stock your IT toolbox with every solution ever printed in Windows IT Pro and SQL Server Magazine plus bonus Web-exclusive content on hot topics. Subscribe to receive the VIP CD and a subscription to your choice of Windows IT Pro or SQL Server Magazine!



Order Your Fundamentals CD Today!
Gain an introduction to Exchange, learn server security requirements, and understand how unified communications can play a role in your messaging strategies with this free Exchange CD.
Windows IT Pro Home Register About Us Affiliates / Licensing Media Kit Contact Us/Customer Service  
SQL Connected Home IT Library SuperSite FAQ Wininfo News
Europe Edition Office & SharePoint Pro Windows Dev Pro Windows Excavator 
 
 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