httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Nerad <jne...@cimedia.com>
Subject Re: VirtualHosting
Date Thu, 01 Aug 2002 14:13:22 GMT
james@jsquared.ca 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 24.141.11.74
>  
> <VirtualHost www.jsquared.ca>
> ServerAdmin james@jsquared.ca
> DocumentRoot /home/ftp/www/site.trebas/htdocs
> ServerName www.jsquared.ca
> ErrorLog /var/www/site.trebas/logs/error_log
> TransferLog /var/www/site.trebas/logs/access_log
> </VirtualHost>
>  



> <VirtualHost www.bozack.com>
> ServerAdmin james@jsquared.ca
> DocumentRoot /home/ftp/www/site.bozack/htdocs
> ServerName www.bozack.com
> 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?

http://httpd.apache.org/docs/vhosts/name-based.html

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
> james@jsquared.ca
>  
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message