LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

RE: apache name mased virtual server

To: <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: apache name mased virtual server
From: "MIS - Ben Murphy" <bmurphy@xxxxxxxxxxxxxxxx>
Date: Fri, 27 Oct 2000 14:43:13 +0100
Hi,

It isn't too clear what you are trying to achieve, but below is
my interpretation of what you require, and also a known working solution,
which I also use.

Requirements:

To host large quantities of websites on an lvs cluster.

Solution:

This is dependant on the type of clustering in use, ie. NAT, Direct Routing.

However, the solution I have employed in a NAT configuration is as follows.

Configure LIVE internet DNS servers with the address with the domain, e.g.
lastminutetour.com
and create an A record pointing to your LIVE internet LVS IP address, e.g.
200.10.20.30

Then configure an INTERNAL DNS server for the REAL hosts WITHIN the LVS
cluster OR modify the REAL servers /etc/hosts file.

In the DNS or hosts file, put the full domain and the PRIVATE IP of the REAL
host, e.g. www.lastminutetour.com               192.168.1.10


When a user enters the website url (www.lastminutetour.com) their machine
will lookup the LIVE internet address and return this to the user. e.g.
200.10.20.30
Then the users machine will request the website from 200.10.20.30, this
request hits the LVS router(s), and then gets forward to the REAL apache
servers.

The Apache server, receives the request for www.lastminutetour.com, BUT then
it has to resolve this name, to ensure the resolved IP matches the one set
in the apache configuration, e.g. the directive NameVirtualHost
192.168.1.10:80

If you have not set the DNS or hosts file as above (i.e. your current
configuration) then the Apache webserver will lookup the name
www.lastminutetour.com, and this will resolve to 200.10.20.30 and not the
local ip 192.168.1.10. As such Apache refuses to display the correct site.



Hopefully the above is a good enough explanation of the process for all who
need to know.
And if any of the information is incorrect, maybe I didn't explain it well
enough, or if someone has any comments, I'm sure everyone on the list would
love to hear them.

The above should also provide you, any anyone else who needed/wanted to know
with a solution for NAT and virtual hosting with Apache.

Best Regards,

Ben Murphy,


-----Original Message-----
From: Mailing Manager [mailto:mailing@xxxxxxxxxxxxxxxxxx]
Sent: Friday, October 27, 2000 1:55 PM
To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: apache name mased virtual server



Hi all,
          i've readed some time ago about the possibilities to use the
ip-based virtual server solution.Now i use it.
Several different virtaul ip, real ip, on the lvs host and different port on
the real servers so the ip1:80 will be real:80, ip2:80 real:81 and so on.
But i have only a class C, 32 ip.
With the name based soluton i can have hundred of web site on a single ip.
IT is abolutely impossible to make it works with an lvs host and apache
1.3.12????

thanks




<Prev in Thread] Current Thread [Next in Thread>