LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

RE: Virtual servers and LVS

To: "Edward Chow" <chow@xxxxxxxxxxx>, <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: Virtual servers and LVS
From: Pietro Ravasio <pietro.ravasio@xxxxxxxxxxxxx>
Date: Sun, 08 Oct 2000 11:21:50 +0200
At 14.27 07/10/00 -0600, Edward Chow wrote:

Hi edward, thank you very much for replying,

Peitro,

For some one to diagnose your problem, you need to include the related <virtualhost> block directives in  the httpd.conf file. For the named-based virtual hosting,  common problems are

Here it is:

NameVirtualHost 151.39.82.13
<VirtualHost 151.39.82.13>
        ServerAdmin webmaster@xxxxxxxxxxxxx
        DocumentRoot /home/httpd/abbeyphone.it
        ServerName www.abbeyphone.it
</VirtualHost>
<VirtualHost 151.39.82.13>
        ServerAdmin webmaster@xxxxxxxxxxx
        DocumentRoot /home/httpd/others
        ServerName www.abbeynet.it
        ServerAlias ...(a bunch of other domain names...)
</VirtualHost>
<VirtualHost 151.39.82.13>
        ServerAdmin webmaster@xxxxxxxxxxx
        DocumentRoot /home/httpd/ravasio.net
        ServerName www.ravasio.net
</VirtualHost>
<VirtualHost 151.39.82.13>
       ServerAdmin webmaster@xxxxxxxxxxxxxxxxx
       DocumentRoot /home/httpd/html
       ServerName lvs.abbeyphone.it
       ServerAlias *.*.it *.*.com *.*.net
</VirtualHost>

At this moment only *.abbeyphone.it is worldwide resoluble (www.abbeyphone.it = 151.39.82.13), but if you try to connect this URL, Apache will transfer you /home/httpd/html files.

It seems that NAT'ing makes it impossible for Apache to correctly understand requested domanin name... Or maybe I'm doing something wrong in Apache configuration...

My LVS configuration: (/etc/lvs.cf)

...
virtual webserver {
        address = 151.39.82.13 eth1:1
...
   server uno {
          address = 172.16.0.11
          active = 1
          weight = 200
          }
   server unoB {
          address = 172.16.0.21
          active = 1
          weight = 200
          }
...

I've tried to use domain name instead of ip numeber in "NameVirtualHost" but this was useless; using real servers' private ip numbers instead will make Apache load the first "VirtualHost" DocumentRoot files.

  1. In virtualhost directives, you specified full domain name, e.g., b2b.ucs.edu, while the users enter part of the domain name, e.g., b2b, in their browsers.
No, I don't think this is the actual problem (even if it could be in the future), at this moment I'm doing some test by myself tryng to connect to http://www.abbeyphone.it (without success).
  1.  The apache (1.3.12) finds the value in the Host meta header is b2b and not b2b.ucs.edu in httpd.conf.  It will fail to match the virtual hosted site and return the default web site. We solve this puzzle in class.  More likely this is the source of your problem?
  2. the domain name of the virutal site are not registered or not entered in the dns server.
At this moment only abbeyphone.it is registered and mainteined by myself (my DNS: 151.39.82.129 ). And it should work! :((

I have not verified that on our LVS with Apache servers yet.

Could you, please? It would be of great help!

Kind Regards,
Pietro Ravasio
<Prev in Thread] Current Thread [Next in Thread>