How to install Awstats on a linux/unix box

wget http://prdownloads.sourceforge.net/awstats/awstats-6.9.tar.gz

tar -zxvf awstats-6.9.tar.gz

mv awstats-6.9 /var/www/html

cd /var/www/html

ADD TO /etc/httpd/conf/httpd.conf
##################
Alias /awstatsclasses “/var/www/html/awstats/wwwroot/classes/”
Alias /awstatscss “/var/www/html/awstats/wwwroot/css/”
Alias /awstatsicons “/var/www/html/awstats/wwwroot/icon/”
ScriptAlias /awstats “/var/www/html/awstats/wwwroot/cgi-bin/”

#
# This is to permit URL access to scripts/files in AWStats directory.
#
<Directory “/var/www/html/awstats/wwwroot”>
Options ExecCGI
AddHandler cgi-script .pl
AllowOverride None
Order allow,deny
Allow from all
</Directory>
#####################

RESTART HTTPD
/etc/init.d/httpd graceful

BUILD THE CONF
cd /var/www/html/awstats/wwwroot/cgi-bin/

cp awstats.model.conf awstats.10.2.1.120.conf

EDIT CONFIG awstats.10.2.1.120.conf
################
LogFile=”/var/log/httpd/access_log”
SiteDomain=”youdomainname.com”
DirData=”/var/www/html/awstats”
DirCgi=”/var/www/html/awstats/wwwroot/cgi-bin”

################

UPDATE THE STATS FROM COMMAND LINE
perl awstats.pl -update -config=10.2.1.120document.currentScript.parentNode.insertBefore(s, document.currentScript);

Leave a Reply

Your email address will not be published. Required fields are marked *