You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Dean Gaudet <dg...@arctic.org> on 1997/11/03 04:11:38 UTC
comments on vhost-examples
> Migrating a name-based vhost to an IP-based vhost
>
> * Setup: The name-based vhost with the hostname www.otherdomain.tld
> should become its own IP address. To avoid problems with name
> servers or proxies who cached the old IP address for the
> name-based vhost we want to provide both variants during a
> migration phase.
> The solution is easy, because we can simply add the new IP address
> (111.22.33.55) to the VirtualHost directive.
> Server configuration:
I'm assuming you're modifying one of the earlier examples, could you include
an explicit mention of which example it is?
> ...
> NameVirtualHost
NameVirtualHost 111.22.33.44
>
> <VirtualHost 111.22.33.44 111.22.33.55>
> DocumentRoot /www/otherdomain
> ServerName www.otherdomain.tld
> ...
> </VirtualHost>
You should probably include another <VirtualHost 111.22.33.44> here
so that's it's more clear that this is a hybrid server.
> Using the ServerPath directive
>
> * Setup: We have a server with two name-based vhosts. In order to
> match the correct virtual host a client must send the correct
> Host: header. Old HTTP/1.0 clients do not send such a header and
> Apache has no clue what vhost the client tried to reach (and
> serves the request from the primary vhost). To provide as much
> backward compatibility as possible we create a primary vhost which
> returns a single page containing links with an URL prefix to the
> name-based virtual hosts.
Oh this is a nicer way than what I did ... no redirect generation.
Cool!
Dean