[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Apache2 VHosts and AWStats within a clustered environment?



Hi all,

I'm not sure if "clustered" is exactly the phrase I'm looking for here,
but nonetheless, here is my issue:

We have a "cluster" of web-servers configured using heartbeat as
follows (only two servers illustrated for clarity's sake!):

-----------     -----------
|Director1|	|Director2|
-----------	-----------
    |   \      /   |
    |    \    /    |
    |     \  /     |
    |      \/      |
    |      X       |
    |     / \      |
    |    /   \     |
------------  ------------
|WebServer1|  |Webserver2|
------------  ------------


The servers share a number of vhosts - many of which are dynamic sites
using PHP/MySQL -for which we need to provide AWstats info for our
customers.

Our concern is that as we have individual log files for each VHost on
each individual webserver, the AWStats information cannot be guaranteed
to be accurate.

One of the options that we have discussed is logging all the vhost's
log files to a central log server via NFS (in order to keep the log
format) and then have each AWStats instance on each server read the
logs from the central NFS share when it comes to update the graphs
etc.  The Issue I have found is that a number of people (include Tony
Mobily in the "Hardening Apache" book) appear to recommend against this.

The other option that we have spoken about is copying all the log files
to a central server each day, merging them into a single file, sorting
the file and then running AWStats against that file before copying all
the graphs etc back to the webServers.  I can see two distinct
disadvantages to this:

1) There will be a huge amount of network traffic as the logs are
shuttled back and forth between the servers
2) If AWStats is updated from the browser interface, it will only be
updated on the server that holds the current connection

I'm sure that someone out there must have been in this situation
before, so how did you do it? :oP

Unfortunately, switching from AWStats to another package is not an
option.  Fortunately, everything else is fair game! :o)

Thanks in advance,

Matt
-- 
Matthew Macdonald-Wallace
matthew@truthisfreedom.org.uk
http://www.truthisfreedom.org.uk


Reply to: