You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "J. Greenlees" <ja...@shaw.ca> on 2002/12/20 16:47:33 UTC

Re: [users@httpd] virtual hosts problem


arthur@tomrad.ro wrote:
> Hi!
> 
> I have a DNS master (BOX1) for mydomain.com which points 2 subdomains to 
> another linux box, located behind an ISA server. The linux box behind (BOX2) 
> has a local IP (192.168.0.3) and is published on the Internet through ISA.
> I can see from the Internet http://box2.mydomain.com.
> I configured 2 virtual hosts on BOX2 but all I get is the default host 
> (box2.mydomain.com). I can's see for example vh1.mydomain.com or 
> vh2.mydomain.com, although the DNS is pointing correctly.
> 
> In httpd.conf I have:
> 
> NameVirtualHost 192.168.0.3
> 
> <VirtualHost box1.mydomain.com>
>     DocumentRoot /www/htdocs/box1
>     ServerName box1.mydomain.com
> </VirtualHost>
> 
> <VirtualHost vh1.mydomain.com>
>     DocumentRoot /www/htdocs/vh1
>     ServerName vh1.mydomain.com
> </VirtualHost>
> 
> <VirtualHost vh2.mydomain.com>
>     DocumentRoot /www/htdocs/vh2
>     ServerName vh2.mydomain.com
> </VirtualHost>
> 
> When starting httpd I get this error:
> [warn] NameVirtualHost 192.168.0.3:0 has no VirtualHosts
> 
> Thanks for any advice,
> 
> Arthur
> K.

to quote Boyle Owen from some with similar problem:
"
NameVirtualHost 192.168.1.1

	<VirtualHost 192.168.1.1>
	  ServerName www.site1.com
	  DocumentRoot /home/site1/html
	  ... etc.
	</VirtualHost>

	<VirtualHost 192.168.1.1>
	  ServerName www.site2.com
	  DocumentRoot /home/site2/html
	  ... etc.
	</VirtualHost>
"

use the ip in the virtual host not the name, then you won't get that error.

Jaqui


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org