Virtual Hosting

datawolf@ibm.net datawolf@ibm.net
Thu, 15 Jun 2000 20:46:44 -0700


Anything outside the <VirtualHost> tags has two functions: (1) The
defaults for the Virtual Hosts, and (2) the actual settings for anything
that doesn't match any of the Virtual Hosts.

The solution is to put a ServerName line in each Virtual Hosts section.

-BVG

> Charlie Bullen wrote:
> 
>  I am currently hosting 1 domain on my server. It is a Gateway
> microserver running redhat linux and Apache 1.3
> 
> THe server name setting is
> 
> ServerName microserver.travelexecutives.com
> 
> this is the configuration for the travelexecutives.com domain
> 
> <VirtualHost 63.226.30.194>
>  ServerAdmin webmaster@travelexecutives.com
>  DocumentRoot /home/groups/home
>  ServerName microserver.travelexecutives.com
>  ErrorLog logs/travelexecutives.com-error_log
>  TransferLog logs/travelexecutives.com-access_log
>  </VirtualHost>
> 
> I now want to host another domain, travelcruise.com on the same
> server.
>  I still have several IP address available. Based on my reading of the
> my
>  redhat manual and Apache documentation, I think I should add the
>  following to the httpd.conf file if I use the IP address
> 63.226.30.195.
>  I have established  the /home/groups/travelcruise
>  directory
> <VirtualHost 63.226.30.195>
>  ServerAdmin webmaster@travelexecutives.com
>  DocumentRoot /home/groups/travelcruise
>  ServerName microserver.travelexecutives.com
>  ErrorLog logs/travelcruise.com-error_log
>  TransferLog logs/travelcruise.com-access_log
>  </VirtualHost>microserver.travelexecutives.com
> 
> 
> What is not clear is should I keep the servername the same for all =
>  domains, namley microserver.travelexecutives.com
>  or should I change it to microserver.travelcruise.com ?
> 
> Regards,
> 
> Charlie