Apache Server configuration support - Mirror apache2 configuration across multiple servers in cluster

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > November 2007 > Mirror apache2 configuration across multiple servers in cluster





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Mirror apache2 configuration across multiple servers in cluster
JamesG

2007-11-27, 1:33 pm

Hi,

I have several servers running behind a load balancer.
It is somewhat tedious to copy all the virtual hosts etc across to a
new server as it is added to the cluster.

My question is, can i possibly mirror the apache2.conf and sites-
available folder between all servers?

Of course the virtualhosts are different because they specific the IP
per server so this isn't very straight forward.

any ideas?

Thanks
Jim Hayter

2007-11-27, 1:33 pm

JamesG wrote:
> Hi,
>
> I have several servers running behind a load balancer.
> It is somewhat tedious to copy all the virtual hosts etc across to a
> new server as it is added to the cluster.
>
> My question is, can i possibly mirror the apache2.conf and sites-
> available folder between all servers?
>
> Of course the virtualhosts are different because they specific the IP
> per server so this isn't very straight forward.
>
> any ideas?
>
> Thanks


This is what I do. Note - I suspect there are easier ways, this works
for me.

I keep my configuration files in SCCS in an NFS directory available to
all the web servers. The configuration files include some "tokens" that
will be replaced by values that differ by web server (hostname, IP
address, log file prefix (usually hostname), and office IP range).
After making a configuration change and committing it to SCCS, I run a
script that gets the current version of all configuration files in a
"current" directory on the NFS server. Then (on each webserver), I run
a script (link to NFS server - so one copy) that copies the "current"
files to the web server and replaces the tokens with the appropriate values.

This is working for me with 6 production web servers. It gets to be a
bit of a pain. At some point, I'd like to write something to automate
the copying and token replacement steps that I can run once to perform
those tasks on each web server.

Note that this still leaves the server graceful restart/start and stop
to be done manually on each web server.

HTH,
Jim
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com