This blog has been moved to http://geekaider.com
There are many tools available on web which could read Apache/IIS log files and produce meaningful information/graphs out of it.- On client side I prefer WebLog Expert.
- On server side I prefer installing AWStats.
- Understand WebLog Expert and AWStats
- Install AWStats on Linux
What is WebLog Expert?
WebLog Expert is a fast and powerful access log analyzer. It will give you information about your site's visitors: activity statistics, accessed files, paths through the site, information about referring pages, search engines, browsers, operating systems, and more. The program produces easy-to-read reports that include both text information (tables) and charts. WebLog Expert is capable of reading Apache and IIS log files. It can even read GZip and Zip log files. To install WebLog Expert on windows desktop download WLExpertSetup.exe and run the installation wizard. A freeware version known has WebLog Expert Lite is also available on internet.
What is Awstats?
AWStats is a free powerful and featureful tool that generates graphical web server statistics from Apache log files. 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.
AWStats installation on Linux
Prerequisites
- Linux (preferably Centos 5.6) machine with root privileges.
- Apache installed in /usr/local/apache2214/ and running.
- AWStats RPM to be downloaded from http://awstats.sourceforge.net/#DOWNLOAD
How to install AWStats
1) Download RPM from awstats website and install itrpm -ivh awstats-6.95-1.noarch.rpm2) Copy model file
cp /usr/etc/awstats/awstats.model.conf /usr/local/awstats/wwwroot/cgi-bin/awstats.model.conf3) Run auto-configuration script
cd /usr/local/awstats/tools/
perl awstats_configure.pl
Apache Config file path – /usr/local/apache2214/conf/httpd.conf4) Modify conf file
Do you want me to setup Apache to write 'combined' log files [y/N] ? y
Do you want me to build a new AWStats config/profile – Y
What is the name of your web site or profile analysis ? – demo
In which directory do you plan to store your config file(s) ? – /etc/awstats
Press ENTER to continue...
Press ENTER to finish...
vi /etc/awstats/awstats.demo.conf5) Create Data Dir
LogFile="/usr/local/apache2214/logs/access_log"
LogFormat=4 #or may be 1, (see awstats or apache documentation for help)
DirData="/var/lib/awstats"
mkdir /var/lib/awstats6) Add authentication on awstats page
htpasswd -cm /etc/awstats/awstats.authfile statsadminChange Ownership for this file
password : ***
confirm password : ***
chown root:daemon /etc/awstats/awstats.authfileChange permissions too
chmod 640 /etc/awstats/awstats.authfileMake Apache aware of this authentication configuration
vi /usr/local/apache2214/conf/httpd.conf
#This secion is to provide Authentication on awstats7) Test & Reload new apache configuration
AuthType Basic
AuthName "Awstats Authentication"
AuthUserFile /etc/awstats/awstats.authfile
Require valid-user
/usr/local/apache2214/bin/apachectl -t
Syntax OK
/usr/local/apache2214/bin/apachectl -k graceful8) Update the stats
perl /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=demo -update9) Check browser
http://www.servername.com/awstats/awstats.pl?config=demo
AWstats - Summary, Monthly, Daily Report
AWStats - Day of week, Hourly Report
crontab –e
@daily perl /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=demo1 –update
No comments:
Post a Comment