Re: [users@httpd] Server configuration stategy

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

 



Hi Owen. This is a very big help. I really appreciate your advice. I have an IP for each server in DNS. So I should be able to set these up as Name Based Virtual servers without having to go through one IP even though they use the same domain (ie *.mydomain.com - am I correct? This will be good since it will also balance the traffic much better.

I did not really know whether I should be looking at mounting the other server for the second case or whether this would be a situation where each subdomain should be passed through to a virtual host to pick up each site directory individually. So if you went to http://www.mydomain2.com/sites/ce54040249 you would be accessing the information through apollo from artemis for a virtual host set up for ce54040249. My plan is to add more servers like artemis in the future.

Regards,
David

On Wednesday, March 23, 2005, at 11:03 AM, Boyle Owen wrote:



-----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...



---------------------------------------------------------------------
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