RE: [users@httpd] Server configuration stategy

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

 




> -----Original Message-----
> From: David Pratt [mailto:fairwinds@xxxxxxxxxxx]
> Sent: Mittwoch, 23. März 2005 15:09
> To: users@xxxxxxxxxxxxxxxx
> Subject: Re: [users@httpd] Server configuration stategy
> 
> 
> Hi.  Thank you for your reply.  I realize after looking at my 
> post that 
> I was not very clear. My apologies.  I need the two servers to serve 
> different information.  My main domain needs to serve 
> subdomains on the 
> two servers.  I am setting up 20 sites per server and each site needs 
> to be accessible using a numbered subdomain.  The two servers I am 
> calling apollo and artemis.
> 
> So apollo will serve:
> 
> be11727372.mydomain.com
> be12704055.mydomain.com
> be19534514.mydomain.com
> be21346418.mydomain.com
> be22354422.mydomain.com
> be32818127.mydomain.com
> be34965519.mydomain.com  etc...
> 
> and artemis serve:
> 
> ce40514199.mydomain.com
> ce26082086.mydomain.com
> ce61652311.mydomain.com
> ce54040249.mydomain.com
> ce18789226.mydomain.com
> ce02801628.mydomain.com
> ce34463026.mydomain.com  etc...
> 
> On apollo is the main site  http://www.mydomain.com - so the first 
> thing is getting the one domain to work over the two IP's. 

You want to serve this site from either server? Then you need two IPs in
DNS or a load balancer, as discussed earlier.

> I 
> had done 
> a bit of reading and what I interpreted was that to do this, traffic 
> would need to come to one IP (the master) and be passed to a slave.

How many IPs do you have? One or two?

If one, then let apollo hold that IP on one interface and serve all the
be* VHs from there using name-based VHs. On a second interface (eg
192.168.1.1) on apollo, connect via an internal network (could be just
one cable) to artemis (eg 192.168.1.2 only). Then set up another set of
ce* VHs in apollo which ProxyPass to artemis (eg:

<VH ceNNN-IP:80>
  ServerName ceNNN
  ProxyPass / http://192.168.1.2/
  ...
</VH>

On artemis you just set up all the ce* VHs as name-based.

If two IPs, then set up the be* NBVHs on apollo and the ce* NBVHs on
artemis as if they were two separate servers (which they are).


> 
> I found the following reference on the apache site that talks about 
> passing through to a virtual server on another machine:
> 
> The following example allows a front-end machine to proxy a 
> virtual host
> through to a server running on another machine. In the example, a 
> virtual host
> of the same name is configured on a machine at 192.168.111.2 . The
> ProxyPreserveHost On directive is used so that the desired 
> hostname is 
> passed
> through, in case we are proxying multiple hostnames to a 
> single machine.
> 
> <VirtualHost *:*>
> ProxyPreserveHost On
> ProxyPass / http://192.168.111.2
> ProxyPassReverse / http://192.168.111.2/
> ServerName hostname.example.com
> </VirtualHost>
> 
> Besides being accessible by each numbered subdomain, each site must 
> also be accessible using its own domain name.  So I need to be a bit 
> clearer on this yet to do something.
> 
> The second situation is that I have another major domain (I'll call 
> this mydomain2).  I want this domain served from apollo (the main 
> server)  but I want mydomain2 to get its content from apollo and 
> artemis both so that the folders under the web root of each 
> contribute 
> to one site.

You need NFS to allow each server to mount the other's disks. This isn't
really an apache issue - it's a general sys-admin problem. By adjusting
the mount points on each side you could achieve the parallelism you
want. eg:

on apollo:

/www/sites/be1	-> /dev/hdc/www/sites/be1
/www/sites/be2	-> /dev/hdc/www/sites/be2
/www/sites/ce1	-> artemis:/export/www/sites/ce1
/www/sites/ce2	-> artemis:/export/www/sites/ce2
etc.

Alternatively, you could store all the data on one server and just mount
that disk on the other, eg

on apollo:
/www/sites	-> /dev/hdc/www/sites

on artemis:
/www/sites	-> apollo:/export/www/sites

Another idea would be to get a disk-array and mount it on both servers..

Frankly, once you have two machines reading the same data, you have to
get away from the idea of local disks and start thinking about network
drives...

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 

> 
> On each apollo, the web root would look like this (except 20 sites):
> 
> www    ---|
> 		  |---------sites
> 					|
> 					|------------ be11727372
> 					|------------ be12704055
> 					|------------ be19534514
> 					|------------ be21346418
> 
> and on artemis:
> 
> www    ---|
> 		  |---------sites
> 					|
> 					|------------ ce40514199
> 					|------------ ce26082086
> 					|------------ ce61652311
> 					|------------ ce54040249
> 
> Each site would look something like this:
> 
> sites  ---|
> 		  |---------be11727372
> 					|
> 					|------------ index.html
> 					|------------ images
> 					|-----------  files
> 					|------------ etc ...
> 
> 
> So I literally want either the files to appear in the web route of 
> apollo like this:
> 
> 		  |---------sites
> 					|
> 					|
> 					|------------ be11727372
> 					|------------ be12704055
> 					|------------ be19534514
> 					|------------ be21346418
> 					|------------ ce40514199
> 					|------------ ce26082086
> 					|------------ ce61652311
> 					|------------ ce54040249
> 
> or at least have the paths point the right place so that if I typed 
> http://www.mydomain2.com/sites/ce54040249 ,  I will get the 
> content of 
> ce54040249 which is on artemis.
> 
> So I am looking for any recommendations that will help me accomplish 
> this.  Many thanks.
> 
> Regards,
> David
> 
> 
> >
> > Not sure I entirely understand this... Do you mean how do you keep
> > /usr/local/www on server1 synchronised with /usr/local/www 
> on server2?
> > (ie, two physical disks)
> >
> > One solution is, don't. Put the data in one place and then 
> have one of
> > the servers mount the disk remotely (see 
http://nfs.sourceforge.net/).
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx

This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please notify the sender urgently
and then immediately delete the message and any copies of it from your
system. Please also immediately destroy any hardcopies of the message.
You must not, directly or indirectly, use, disclose, distribute, print,
or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail
communications through their networks. Any views expressed in this
message are those of the individual sender, except where the message
states otherwise and the sender is authorised to state them to be the
views of the sender's company. 



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux