Installing AWStats on Linux VPS, multiple domains Review of web hosting in India Contact us Home
One of the major problems with
Indian web hosting companies is that they provide incomplete
site statistics. They usually install Webalizer, sometimes an incomplete version
which does not even show the number of visitors per day. Webalizer is usually
run once a day (set in the cronjob). If you ask for more
details , you are asked to download stats to your PC and use software like
Net tracker Lite (it is free). But as your website grows, downloading and analysing data becomes
tedious and time consuming, especially for large log files.
AWstats provides
free real time web statistics, and can be installed on Linux or Windows server.
Initial installation may take some time, especially if you do not know the
basics of Linux or Unix. This is for version 6.4 , the latest version 6.5 has
been released in April 2006. Update the docs, wwwroot and tools sub directories
of awstats and your awstats version will get updated to version 6.5. The
old directories have to be deleted
A step by step guide to installing Awstats on Apache servers with Red Hat Linux
is compiled from various sources and based on my personal experience.
1. Ensure that a directory for the website exists on the server and the DNS
details are updated
2. Latest version of Perl should be installed on the VPS. This can be done from
the control panel provided by your hosting company
3. Download PuTTY software . You can use it on your Windows PC to connect to
your server through SSH
4. Learn the basic commands for Linux/Unix like cd (change directory), ls (list
files) using a search engine like Google
5. Login to your server using SSH, you can specify your host name or IP
6. For Linux you have to download the tgz version of Awstats (for Linux)
from http://awstats.sourceforge.net/
the command will be
$ wget path to download awstats
You will have to select from various
servers, select the nearest one. Since I am in Mumbai, India the servers in
Tokyo /Australia are most suitable.
7. Uncompress the file using the command
$tar -zxvf awstats-6.4.tgz ( this took up a lot of my
time)
8.Make a directory to store stats
$ mkdir awstats
Move to awstats directory
$ mv awstats-6.4 awstats
9. and run the configuration tool
$ tools/awstats_configure.pl
When asked to create a new config file, say yes and give your site name,
yoursite.com
10. Edit the awstats config file using pico text editor
pico ****/awstats.yoursite.com.conf
Change
LogFile="/var/**/httpd/access_log" (line 51)
access_log should be actual log file name as provided by hosting provider
AllowToUpdateStatsFromBrowser=1 (line 233)
11.edit cron file using the command crontab -e
0 1 * * * /*****/awstats.pl -update -config=yoursite.com
Set the update frequency according to the traffic to your website
It should update at least once a day, just before the logs are rotated. If there
is problem in the format , you will get an error message.
12. Restart the VPS. If the VPS is not restarted, the log file for the domain
name will not be created. VPS should be restarted when website traffic is low.
13 Run an update
$/usr/local/*****/awstats.pl -update -config=yoursite.com
There should be no error at this stage, if AWstats is properly
installed.
14.Modify the .htaccess file to make the stats password protected
15.For multiple websites, steps 9-14 are the same, one additional step is
editing the config file.
pico /***/httpd/conf/httpd.conf
For
<VirtualHost *>
ServerName secondsite.com
ServerAlias www.secondsite.com
DocumentRoot /****/secondsite
ScriptAlias /******/
</VirtualHost>
Add a new line CustomLog
Code:
<VirtualHost *>
ServerName secondsite.com
ServerAlias www.secondsite.com
DocumentRoot /******/secondsite
ScriptAlias /*********
CustomLog logs/secondsite_access_log combined
</VirtualHost>
When AWStats was installed on Windows server (both IIS 5.0 and IIS6.0) for some of our websites, I faced problems. The stats would not update after 3 months (for Windows 2003) and we had to contact customer support of the reseller. I did not install AWstats on these servers, but I think it is related to log file size. For another website (IIS5.0), the web statistics for the last days of the month would magically disappear.
For multiple websites, your access logs could take up a lot of space for busy websites. More information is available on log files on Apache HTTP Server and how logs are stored on virtual hosts at http://httpd.apache.org/ . For site search, you can install perlfect search , but the path should be properly defined.
If you have any query , feedback or suggestion, or wish to share your experience with us, please send an email
© Copyright pcworkathome.in Contact us Home