PDA

View Full Version : Webalizer and Backup, a solution



nsc
12-18-2004, 02:39 PM
I have found that whenever I was backing up my site via Site Manager, the Webalizer log analysing tool was recording webserver hits originated from the backup program.

I think I now fixed this problem. Here is what I did:

I logged in via SSH and changed my Webalizer config file to ignore hits generated from my site or Westhost.

On my VPS my Webalizer configuration file is located at:

[code]
/var/www/cgi-bin/plugins/Webalizers/defaultstats/webalizer.conf
[/code

You can find your own config file by issuing this command:

[code]
find /var/www/cgi-bin/plugins/Webalizers -iname webalizer.conf
[/code]

If you have installed many webalizers you may have many .conf files.

Use this command to edit your configuration file:

[code]
pico /var/www/cgi-bin/plugins/Webalizers/defaultstats/webalizer.conf
[/code]

(if you see an empty file, then your config file lives somewhere else).

In your file, use the down arrow to navigate towards the bottom until you see a series of IgnoreSomething-like sentences. In my file this is at line n. 489.

I added these lines to my file:

[code]
IgnoreSiite (IP address of my Site Manager)
IgnoreSite *.west-datacenter.net
IgnoreSite localhost
IgnoreSite (IP address of my VPS)
[/code]

The first is the IP address of the Site Manager where I backup my site (visit your Site manager and look in the address bar to find out the IP address - I don't know whether all users have the same Site Manager). The second line is the domain name associated with it. The third line is my VPS and the fourth line is the IP address of my VPS (you can find it in your Site Manager). IP addresses consists of four numbers separated by points.

I suppose just one line would be enough to fix the issue, but I am lazy to test and find exactly which IP/domain the backup program uses (I suppose it can be found by looking at the Apache's raw log file after a backup). So I just ignored all domains/IPs that the backup program could potentially use.

Ignoring a site in Webalizer just causes its hits not to show up in the statistics. The ignored sites can still access the VPS without problem.

After you add these lines, you save the file with CTRL+O and Enter. Hit CTRL+X to exit. Then type exit in SSH to close the SSH session.