|
Installing AWStats on FreeBSD |
|
|
|
|
This tutorial shows step by step installation of AWStats on FreeBSD.
On this tutorial we asume your website is setup in /home/username/public_html/example.com (we will copy there icon files needed by AWStats)
Step 1. Install AWStats package ------------------------------------------- pkg_add install -r awstats
Step 2. Add support for cgi-bin in Apache -------------------------------------------------------- Add ExecCGI option to <directory> tag of your cgi-bin directory:
for example:
<directory "/path/to/your/cgi-bin/"> Options FollowSymLinks MultiViews ExecCGI -Indexes </directory>
Step 3. Copy AWStats files to cgi-bin directory -------------------------------------------------------------- This step will also copy config file to /usr/local/etc/awstats directory.
cd /usr/local/www/awstats/cgi-bin cp -r * /usr/local/www/apache22/cgi-bin/
mkdir /home/username/public_html/example.com/icon cd /usr/local/www/awstats/icons cp -r * /home/username/public_html/example.com/icons/
mkdir /usr/local/etc/awstats cd /usr/local/www/apache22/cgi-bin/ cp awstats.model.conf /usr/local/etc/awstats/
cd /usr/local/etc/awstats cp awstats.model.conf awstats.example.com.conf
Step 4. Edit awstats config file ----------------------------------------- Edit awstats config file for the domain you want to generate statistics :
edit awstats.example.com.conf
Add the following lines:
#----------- LogFile="/var/log/example.com-access_log" DirIcons="/icons" SiteDomain="example.com" LogFormat=1 #-----eof------
(save and exit)
ls -la /var/log/http/example.com-access_log
Step 5. Run awstats to parse log file -------------------------------------------------- cd /usr/local/www/apache22/cgi-bin ./awstats.pl -config=example.com -update
Step 6. See AWStats statistics ----------------------------------------- To see awstats statistics access your domain from browser using:
http://www/example.com/cgi-bin/awstats.pl?config=example.com
|