httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Nerad <>
Subject Re: VirtualHosting
Date Thu, 01 Aug 2002 14:13:22 GMT wrote:
> Hello, I've been working with the O'Reilly Using Apache manual to host
> two websites using one invocation of httpd with <VirtualHost>.
> User www
> Group www
> NameVirtualHost
> <VirtualHost>
> ServerAdmin
> DocumentRoot /home/ftp/www/site.trebas/htdocs
> ServerName
> ErrorLog /var/www/site.trebas/logs/error_log
> TransferLog /var/www/site.trebas/logs/access_log
> </VirtualHost>

> <VirtualHost>
> ServerAdmin
> DocumentRoot /home/ftp/www/site.bozack/htdocs
> ServerName
> ErrorLog /home/ftp/www/site.bozack/logs/error_log
> TransferLog /home/ftp/www/site.bozack/logs/access_log
> </VirtualHost>
> Both domains return the first site.  I expected that Apache would
> examine the headers of the http request and return the requested site
> based on the name.  Do I have to set up multiple local IPs on my machine
> and put each separate IP in each VirtualHost block? Can anyone tell me
> what I am doing wrong?

You are trying to do name based virtual hosting.  This is distinguished 
from IP based virtual hosts, in which it appears to be legal to put in 
the fqdn of the server in the VirtualHost section.  From what I can 
glean from the name based virtual host document, it seems that you have 
to either use a * or the IP address (_not_ the fqdn) of the server in 
the <VirtualHost> directive.

"The argument to the <VirtualHost> directive should be the same as the 
argument to the NameVirtualHost directive (ie, an IP address, or * for 
all addresses."

Jack Nerad

> Thanks a lot!!
> James Herschel
> JSquared Network Solutions
> (905)847-0799

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message