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

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.


To host large quantities of websites on an lvs cluster.


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.
and create an A record pointing to your LIVE internet LVS IP address, e.g.

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.     

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

The Apache server, receives the request for, 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

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, and this will resolve to and not the
local ip 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


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