AWStats is a free powerful and
featureful tool that generates advanced web, streaming, ftp or
mail server statistics, graphically. This log analyzer works as
a CGI or from command line and shows you all possible
information your log contains, in few graphical web pages. It
uses a partial information file to be able to process large log
files, often and quickly. It can analyze log files from all
major server tools like Apache log files (NCSA combined/XLF/ELF
log format or common/CLF log format),WebStar, IIS (W3C log
format) and a lot of other web, proxy, wap, streaming servers,
mail servers and some ftp servers.
A full log analysis enables AWStats to show you the following
* Number of visits, and number of unique visitors,
* Visits duration and last visits,
* Authenticated users, and last authenticated visits,
* Days of week and rush hours (pages, hits, KB for each hour and
day of week),
* Domains/countries of hosts visitors (pages, hits, KB, 269
domains/countries detected, GeoIp detection),
* Hosts list, last visits and unresolved IP addresses list,
* Most viewed, entry and exit pages,
* Files type,
* Web compression statistics (for mod_gzip or mod_deflate),
* OS used (pages, hits, KB for each OS, 35 OS detected),
* Browsers used (pages, hits, KB for each browser, each version
(Web, Wap, Media browsers: 97 browsers, more than 450 if using
browsers_phone.pm library file),
* Visits of robots (319 robots detected),
* Worms attacks (5 worm's families),
* Search engines, keyphrases and keywords used to find your site
(The 115 most famous search engines aredetected like yahoo,
google, altavista, etc...),
* HTTP errors (Page Not Found with last referrer, ...),
* Other personalized reports based on url, url parameters,
referer field for miscellanous/marketing purpose,
* Number of times your site is "added to favourites bookmarks".
* Screen size (need to add some HTML tags in index page).
* Ratio of Browsers with support of: Java, Flash, RealG2 reader,
Quicktime reader, WMA reader, PDF reader(need to add some HTML
tags in index page).
* Cluster report for load balanced servers ratio.
To use AWStats, you need the following requirements:
* Your server must log web access in a log file you can read.
* You must be able to run perl scripts (.pl files) from command
line and/or asCGI (Perl 5.00503 or higher required to run
AWStats 6.0 or higher).
If not, you can solve this by downloading last Perl version
AWStats F.A.Q. to have examples of supported OS and Web
Install AWStats in Debian
# apt-get install awstats
Run the awstats configure script to setup awstats for the
domain you want to monitor.
Remember to repeat the configuration process for each domain you
want to monitor.
# cd /usr/share/doc/awstats/examples/
#/usr/share/doc/awstats/examples$ perl awstats_configure.pl
Answer the questions asked by the script in which you will
need to know the full configuration file path of your web
server(e.g. /etc/apache/httpd.conf), and the name of your domain
for which you are setting up awstats( full-domain-name in this
While running the script it will complain that it is not
being run from the default location (/usr/local/awstats).
Answer yes to the prompt to run from the non-standard
location as the official Debian package of awstats places
the script in /usr/share/doc/awstats/examples/ which is the
Debian way.(See the
original for detailed script output)
After the script exits, you should set up an alias for awstats-icons
in httpd.conf. Inserted it in the Aliases section.
The awstats_configure.pl script adds it in the end of
httpd.conf - comment/remove it.
Your entry for /awstats-icon/ in the Aliases section should
Alias /awstats-icon/ /usr/share/awstats/icon/
Allow from all
Now you can restart apache:
# /etc/init.d/apache restart
Edit the awstats' domain configuration file you just created
/etc/awstats/awstats.full-domain-name.conf to have
LogFormat=1. Default "LogFormat=4" does not show Browsers, OS,
keywords, etc. Do make sure that the parameter SiteDomain has a
value of the domain tomonitor. Generate stats the first time by
using the following command.
(You can allow awstats to read your apache log file by
changing permissions. Run "chmod o+r
Update for config "/etc/awstats/awstats.full-domain-name.conf"
With data in log file "/var/log/apache/access.log"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Phase 2 : Now process new records (Flush history on disk after
Jumped lines in file: 0
Parsed lines in file: 60
Found 0 dropped records,
Found 0 corrupted records,
Found 0 old records,
Found 60 new qualified records.
You can now check the stats in your
browser by point it to
This should get awstats running automatically every half an hour
with the statistics available via your web browser.
After finishing you might want to go back to the configuration
do more tweaking. Reading the documentation in
/usr/share/doc/awstats/ is also