From INIwiki
Jump to: navigation, search

Digg this!


Install on Linux(Redhat) for Apache with RPM

Ensure your apache has the perl module installed

Enabel CentOS plus repository

vi /etc/yum.repos.d/CentOS-Base.repo

Enable the repository with by changing enable to a 1 value

name=CentOS-$releasever - Plus
enabled=1  # <--- Modify Here

Install DAG repository if needed. (RHEL 5x)

rpm -Uhv


rpm -Uhv

Install from RPM

yum install awstats

Build Config file

cp /etc/awstats/awstats.localhost.localdomain.conf /etc/awstats/

Modify the newly built file

vi /etc/awstats/



Change to something like:


NOTE: Use this command for several log files
LogFile="/usr/bin/ /var/log/httpd/* |"



Change to something like:




Change to something like:

HostAliases="localhost REGEX[^.*\.inisec\.com$]"

Allow access

vi /etc/httpd/conf.d/awstats.conf
Alias /awstats/icon/ /var/www/awstats/icon/

ScriptAlias /awstats/ /var/www/awstats/
<Directory /var/www/awstats/>
        Options ExecCGI
        order deny,allow
#       deny from all  #-- Comment out
        allow from all #-- Change from to all

#Alias /css/ /var/www/awstats/css/
#Alias /js/ /var/www/awstats/js/

Manually run first build command

/usr/bin/ now  -confdir="/etc" -awstatsprog="/var/www/awstats/"
This command is found in /etc/cron.hourly/00awstats

Restart Apache

service httpd restart

Check from web browser

Geoip Addon



Install on Windows for IBM Domino server

Until I can transfer this section of the faq use this link or this one


Lotus Domino is a communications platform distributed by IBM
Awstats is a open source web statistics reporting package.

This install will focus on the Windows platform


You will need to install a couple of packages onto windows so awstats will play nice (Links are located below in the downloads section).

  • Download AWStats from
  • Extract to a directory of your choice.
  • Create a directory called "awstats" under the %DOMINO_DATA_DIR%\domino\html directory on your server (for example, "d:\lotus\domino\data\domino\html\awstats").
  • Copy the "wwwroot\icon" directory from the awstats files to %DOMINO_DATA_DIR%\domino\html\awstats (for example: "d:\lotus\domino\data\domino\html\awstats\icon")
  • Copy the contents of the "wwwroot\cgi-bin" directory from the awstats files (and all subdirectories beneath it) to your %DOMINO_DATA_DIR%\domino\cgi-bin directory on the Notes server (for example, "d:\lotus\domino\data\domino\cgi-bin").
  • Also copy the contents of the "tools" directory from awstats to %DOMINO_DATA_DIR%\domino\cgi-bin (for example, "d:\lotus\domino\data\domino\cgi-bin") -- in other words, take all of the .pl files from awstats and put them in your "cgi-bin" directory.
  • From the Domino "cgi-bin" directory, make a copy of the awstats.model.conf file. Call it "awstats.domino.conf". If the file is marked as "Read-Only", you'll want to go to the file properties and uncheck that flag so you can edit it. Open the file in a text editor and make the following changes (please note that Windows users will not be able to read the file very well using Notepad because it uses Unix-style linefeeds, so you'll want to open it in Wordpad or Crimson Editor, or something like that -- I use VIM for windows):

Change the "LogFile" entry to be:

LogFile="perl ./ d:/domino/weblogs/access*.log |"

where "d:/lotus/domino/weblogs" is the path to the log files you defined in step 1 (make sure you use "/" as a directory separator, even on Windows).

*Note* that the command ends with a vertical bar (pipe) character -- this is important.
Change "LogType" to W [hint to search in VIN you must be in read mode and use the / character followed by the text, case sensitive, IE: /LogType]
Change "LogFormat" to 1
Change "SiteDomain" to be the main domain name for this server (like "")
Change "DirIcons" to the relative HTTP path of your icon directory from step 5 above ("../awstats/icon" should work).
Optionally -- Use SkipHosts if you do not want to log your own access. IE: if you local LAN subnet was then..
SkipHosts=" REGEX[^192\.168\.100\.]
Additionally if you don't want to track your friend access who connects from a static ip (public of course) you can use...
SkipHosts=" REGEX[^192\.168\.100\.] REGEX[^65\.206\.180\.44]

Change "AllowToUpdateStatsFromBrowser" to "1" if you want to be able to update the stats from a browser (DANGER -- this could be resource intensive on a busy server); otherwise, if you will be doing updates programmatically, it should be "0".

optionally add the sample Notes file tracking report additions (see below) to the # EXTRA SECTIONS section near the bottom of the file.
  • If you don't have Perl installed on your server, download and install it. For Windows, you can use the free ActivePerl distribution. The install for ActivePerl does require a reboot on 2003 server, so don't install it on a live Domino server unless you're feeling brave.


Run your initial update by opening a command prompt, navigating to the "cgi-bin" directory from above, and entering the following command:

perl -config=domino -update

Once you've run the update command and you have an index file, you can manually create a report as an HTML page by running the following commands from the command prompt in the "cgi-bin" directory:

perl -config=domino -dir=../html/awstats/

[This will build all stat pages for this month, run this from the "cgi-bin" directory:]

To schedule your static reports to be built on a regular basis, use your favorite scheduling program , I used windows scheduler to run a .bat file I created in the "cgi-bin" directory.

awstatupdate.bat file example...

perl -config=domino -dir=../html/awstats/ -update


Domino Install: Julian Robichaux

Digg this!

Personal tools