Install and configure webalizer on Ubuntu
- install webalizer
sudo apt-get install webalizer
If webalizer is not found, you have to add sources in /etc/apt/sources.list: can comment the universe sources. - Enable the apache2 hostname resolution: go into /etc/apache2/apache2.conf: Change
HostnameLookups Off
into
HostnameLookups On - By default webalizer is not well configured: it does not check in the good log. In /etc/webalizer.conf: Change
LogFile /var/log/apache2/access.log.1
to
LogFile /var/log/apache2/access.log - Test webalizer:
sudo webalizer
If you get a warning like warning: Truncating ...
It is because you did not put the hostnameLookup. If afterward, you get this message, it can be because you are attacked by a virus... - Run webalizer as a cronjob. This has to be run as root: Edit the root cronjobs by running the command:
sudo crontab -e
and add the line:
0 * * * * webalizer
With that line, every hour webalizer is run
12 Comments:
Same Thing Happened To Me.
Very useful! It worked for me!! :)
Thankyou ! real easy.
it works for me, very easylah - emi21081@gmail.com
Thank you very much, I looked at other documentation and was going to give up, then I came across this!!!
Thank you again!
Also, you might find webalizer.conf in /etc/webalizer/webalizer.conf
zankiu veri much esquiusmi mai english
Thank you I found it very useful.
Hi
Once again the linux community is of great assistance
Thanks
nickoff
Very nice and wonderfully helpful. Thanks!
I also have a suggestion. Turning HostnameLookups on in Apache can slow the site down, especially if it's a busy server. Instead, it may be more practical to use Apache's logresolve program. So you could write a simple script that resolves IP address in the log before analyzing it. For example:
# Get the name of the log file to use
logfile="`cat /etc/webalizer/webalizer.conf | grep "^LogFile" | cut -d ' ' -f 2`"
# Resolve the IP addresses in the log file before analyzing it
logresolve < $logfile > /tmp/logfile
webalizer /tmp/logfile
rm /tmp/logfile
----------
- apon
Hi,
See here for anothe way of displaying hostnames instead of the IPs found in the log files:
http://help.directadmin.com/item.php?id=27
Really thank you very much!!!
Post a Comment
<< Home