Webalizer
Webalizer is a web server log file analysis program, which produces usage statistics in HTML format for viewing with a browser. The results are presented in both columnar and graphical format, which facilitates interpretation. Yearly, monthly, daily and hourly usage statistics are presented, along with the ability to display usage by site, URL, referrer, user agent, browser and country, user agent and referrer are only available if your web server produces Combined log format files. The person who write this program can be reached with Bradford L. Barrett, brad@mrunix.net.
-
Webalizer RPM is installed by default. Uninstall Webalizer
rpm –e webalizer -
Install GeoIP library
- tar –zxvf /usr/src/GeoIP.tar.gz
- cd /usr/src/GeoIP-version
- ./configure
- make
- make install
-
Install and patch Webalizer with geolizer
- tar –zxvf /usr/src/webalizer-2.01-10-src.tgz
- tar –zxvf /usr/src/geolizer_2.01-10-patch.20040216.tar.gz
- cd /usr/src
- patch –p0 < /usr/src/geolizer_2.01-10-patch/geolizer.patch
- rpm –Uvh /usr/src/libpng-devel-1.2.7-1.i386.rpm
- rpm –Uvh /usr/src/gd-devel-2.0.28-4.i386.rpm
- Add share libraries path /usr/lib to /etc/ld.so.conf
- ldconfig
- cd /usr/src/webalizer-2.01-10
- ./configure –-enable-geoip
- make
- make install
-
Webalizer configuration file webalizer.conf.sample can be found in /etc
-
Create a folder to host respective webalizer configure file for each virtual hosting, mkdir /etc/webalizer
-
mv /etc/webalizer.conf.sample
/etc/webalizer/_webalizer.conf -
vi /etc/webalizer/
_webalizer.conf TopCountries 300 GeoIP yes GeoIPDatabase /usr/local/share/GeoIP/GeoIP.dat LogFile /etc/httpd/logs/<user>_access_log LogType clf OutputDir /home/<user>/web/stats HistoryName webalizer.hist Incremental yes IncrementalName webalizer.current ReportTitle Usage Statistics for HostName <Hostname> PageType cgi PageType php PageType shtml HTMLBody <BODY CLASS="body" BGCOLOR="#E8E8E8" LINK="#0000FF" VLINK="#FF0000"> HTMLBody <STYLE type=text/css> HTMLBody BODY.body {font-family: Helvetica, Arial}A:hover {color: #4F709F} HTMLBody </STYLE> Quiet yes FoldSeqErr yes HideURL *.gif HideURL *.GIF HideURL *.jpg HideURL *.JPG HideURL *.png HideURL *.PNG HideURL *.ra SearchEngine yahoo.com p= SearchEngine altavista.com q= SearchEngine google.com q= SearchEngine eureka.com q= SearchEngine lycos.com query= SearchEngine hotbot.com MT= SearchEngine msn.com MT= SearchEngine infoseek.com qt= SearchEngine webcrawler searchText= SearchEngine excite search= SearchEngine netscape.com search= SearchEngine mamma.com query= SearchEngine alltheweb.com query= SearchEngine northernlight.com qr
-
To update GeoIP.dat in future:
wget -P /usr/src http://www.maxmind.com/download/geoip/database/GeoIP.dat.gzgunzip /usr/src/GeoIP.dat.gz
mv /usr/src/GeoIP.dat /usr/local/share/GeoIP/GeoIP.dat
-
Run webalizer, webalizer –c /etc/webalizer/<user>_webalizer.conf
You may want to add shared libraries path for libGeoIp into /etc/ld.so.conf
By default, libGeoIP library is installed in /usr/local/lib. Run ldconfig after changes.Add a crontab entry as follow (runs everyday at 0010am):
10 0 * * * for i in /etc/webalizer/*.conf; do /usr/local/bin/webalizer -d –c $i; done
Fun. Add to your bookmarks. And how long it took to write articles?
Just some words about WebAlizer…
I don’t like it very much.
It’s rather good and does’t cost anything.
BUT:
1) the stats it gives is incorrect very often
2) some logs of WA are ref spamed, what may cause even DDOS of the site
But its not difficult to tune WA that way so it will work correctly!
Hello, just a question?? this work to centos ?