LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: having trouble with vs and my apache setup.

To: XxEDGExX <jeremy@xxxxxxxxxxxx>
Subject: Re: having trouble with vs and my apache setup.
Cc: linux-virtualserver@xxxxxxxxxxxx, SERVER-LINUX@xxxxxxxxxxxx
From: Wensong Zhang <wensong@xxxxxxxxxxxx>
Date: Sat, 24 Apr 1999 10:16:52 +0800
Hi,

XxEDGExX wrote:

> Hi,
>
> I'm getting very frustrated trying to get name based virtual hosts with
> Apache and virtual server project working properly.
>
> Here's my setup
>
>                  / webserver1(192.168.40.20)
> LD1 machine -->                             * -- fileserver
>                  \ webserver2(192.168.40.21)
>
> The web servers are connected to a fileserver.  The web server
> share that same space.
>
> Problem, no matter what I define for a virtual host, it returns
> the 'root' webserver pages and seems to ignore the virtual host
> directives.  I can't see how this is related to the Linux Director
> machine, other then name resolving is really funky and I could have
> things backwards  somehow.
>
> test.com, the virtual host resolves to the IP of the Linux Director
> machine.  I have the web servers NameVirtualHost point to the IP
> of the Linux Director.
>
> If anyone has a similiar setup, please let me know what I'm missing.
> I'll probable figure it out after I send this mail, but I'm very
> frustrated right now :-)
>

Oh, don't be frustrated. :-) If we want, we can fix it.

Do you run Apache as your web server? and what version?

As I know, the VirtualHost configuration of Apache from 1.3.3 to later
is different from before. You need to specify the IP address for the
virtual host name on your apache web server, this method makes the
address-to-hostname mapping efficiently. The VirtualHost example
from the default http.conf is as follows:

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
#
#<VirtualHost ip.address.of.host.some_domain.com>
#    ServerAdmin webmaster@xxxxxxxxxxxxxxxxxxxx
#    DocumentRoot /www/docs/host.some_domain.com
#    ServerName host.some_domain.com
#    ErrorLog logs/host.some_domain.com-error_log
#    CustomLog logs/host.some_domain.com-access_log common
#</VirtualHost>

>From your virtual server configuration, I guess you are using the
NAT request dispatching technique. The VirtualHost configuration
of webserver1 can be as follows:
    <VirtualHost 192.168.40.20>
       ...
       ServerName  www.domain1.com
       ...
    </VirtualHost>
    <VirtualHost 192.168.40.20>
       ...
       ServerName  www.domain2.com
       ...
    </VirtualHost>

So, you can change the configuration in the webserver2 too

>
> Thanks
> -jeremy
>

Good luck,

Wensong



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