A good and free log analysis tool - awstats

August 27, 2003
web

There are a lot of free http log file analysis tools out there that haven't been updated since the mid 90's, awstats however is both free, and up to date. It looks a bit like web trends (though I haven't used web trends in several years). Here's an online demo. awstats can be used on several web servers including IIS, and Apache. You can either have generate static html files, or run with a perl script in the cgi-bin.

Here's a quick rundown of setting it up on unix/apache

Each virtual web site you want to track stats for should have a file /etc/awstats.sitename.conf the directives for the configuration file can be found here: http://awstats.sourceforge.net/docs/awstats_config.html they also provide a default conf file in cgi-bin/awstats.model.conf you can use this as a base.

Make sure your log files are using NCSA combined format, this is usually done in apache by saying CustomLog /logs/access.log combined you can use other formats but you have to customize the conf file.

You will probably want to edit the LogFile directive to point to where your logfile is stored, SiteDomain this is the main domain for the site, HostAliases lets you put in other domains for the site, and the DirData directive lets you specify where the awstats databases will be stored (each site will have its own file in the directory).

Once that is setup you will want to update the database this is done from the command line by running

perl awstats.pl config=sitename update 

Now copy everything in the wwwroot folder to a web root, and visit http://sitename.com/cgi-bin/awstats.pl if you want to view other domains use /cgi-bin/awstats.pl?config=othersitename

Where sitename would be the name of your config file awstats.sitename.conf

If you want to generate static html files run the awstats_buildstaticpages.pl script found in the tools folder. You have to give it the path to the awstats.pl perl script, and a directory to put the static html files in.

perl awstats_buildstaticpages.pl -config=sitename -awstatsprog=/web/cgi-bin/awstats.pl 
  -dir=/web/stats/sitename/

More setup info can be found here: http://awstats.sourceforge.net/docs/index.html



Related Entries

7 people found this page useful, what do you think?

Comments

Hi, I have a project hosted on sourceforge. How can I setup AWStats on the sourceforge site itself ? Thank you, Colossus
Sorry, but this description is totaly useless. Im sure that you did a LOT more to get awstats working than what you have here. I know its hard to make notes while you are installing and de-bugging, but a blow-by-blow discription is a lot more usefull to those that follow. Please consider those that want to learn and do not have access to a local Linux gru. Thanks
I did a slightly longer review on my blog http://www.atlas-tuesday.com/awstats-review
A routine is established for rest and play. ,
Great Post. I add this Post to my bookmarks.
Great Post. I add this Post to my bookmarks.
I’ve been visiting your blog for a while now and I always find a gem in your new posts. Thanks for sharing.
Very Interesting Information! Thank You For Thi Post!
Thanks For This Post, was added to my bookmarks.
Thank You For This Blog, was added to my bookmarks.
Very Interesting Blog! Thank You For Thi Blog!
I’ve been visiting your blog for a while now and I always find a gem in your new posts. Thanks for sharing.
Awesome Blog. I add this Blog to my bookmarks.
Great Blog. I add this Post to my bookmarks.
ipage hosting information
cheap vps server - Japan
justhost hosting cheap hosting http://technologycanada.com/justhost-hosting/

Post a Comment




  



Spell Checker by Foundeo

Recent Entries



foundeo


did you hack my cf?