Forum Moderators: phranque
Basically, I want to setup a server on my local machine, with access only from the same machine, but want to run two or more virtual hosts.
I've installed apache2triad and have the following config...
-----------------------
From httpd.conf
NameVirtualHost local.test:80
NameVirtualHost localhost:80
<VirtualHost local.test:80>
ServerName local.test
DocumentRoot "c:\apache2triad\htdocs\test"
ErrorLog logs/test-error_log
</VirtualHost>
<VirtualHost localhost:80>
ServerName localhost
DocumentRoot "c:\apache2triad\htdocs\localhost"
ErrorLog logs/localhost-error_log
</VirtualHost>
--------------------------------
In HOSTS file:
127.0.0.1 localhost
127.0.0.1 local.test
--------------------------------
apache -S gives this output...
C:\apache2triad\bin>apache -S
[Wed May 17 11:45:35 2006] [error] (OS 11001)No such host is known. : Cannot resolve host name local.test --- ignoring!
[Wed May 17 11:45:35 2006] [error] (OS 11001)No such host is known. : Cannot resolve host name local.test --- ignoring!
VirtualHost configuration:
127.0.0.1:80 is a NameVirtualHost
default server localhost (C:/apache2triad/conf/httpd.conf:1023)
port 80 namevhost localhost (C:/apache2triad/conf/httpd.conf:1023)
Syntax OK
--------------------------
My browser reports that it can't find server for [local.test...] [localhost...] is fine, and works from the defined directory in httpd.conf
I thought it could be a problem with the XP HOSTS setup, but can't work out what. I can't ping local.test, but can ping localhost. I'm stumped - any ideas much appreciated.
Chroma
Jim