httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jarecsni János <>
Subject RE: testing virtual hosts
Date Mon, 04 Feb 2002 11:27:02 GMT
Well... I tried it it just didn't work anyway... :(

So, here's what I tried:
1) platform is Win2000Prof.
2) in the win2k/drivers/etc/hosts file (equivalent to /etc/hosts on Linuxes)
I added two entries: adam.scorpion.vhost eve.scorpion.vhost

3) I modified httpd.conf as follows:

NameVirtualHost *

<VirtualHost *>
    DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs/adam"
    ServerName adam.scorpion.vhost
<VirtualHost *>
    DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs/eve"
    ServerName eve.scorpion.vhost

4) I created the two subfolders (eve and adam)

5) I run apache -k config
6) Then apache -S which produced:

VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80                   is a NameVirtualHost
                       default server adam.scorpion.vhost (c:/program
files/apache group/apache/conf/httpd.conf:809)
                       port 80 namevhost adam.scorpion.vhost (c:/program
files/apache group/apache/conf/httpd.conf:809)
                       port 80 namevhost eve.scorpion.vhost (c:/program
files/apache group/apache/conf/httpd.conf:813)

I pointed my browser (IE 5.5 and Netscape 6.2) to both eve.scorpion.vhost
and adam.scorpion.vhost but in both cases the default Apache index.html was
returned from under the documentroot. It seems Apache does not recognize
these as vhosts. If I add a third entry in etc/hosts say, with
IP address Apache will serve its default index page when
navigating to this new "host" too.

I tried the IP-based way too, which gave the same result.

What am I doing wrong?


|-----Original Message-----
|From: Jarecsni János []
|Sent: Monday, February 04, 2002 10:44 AM
|To: Joshua Slive []
|Subject: RE: testing virtual hosts
|Thanks very much! That's what I need! :)
||-----Original Message-----
||From: Joshua Slive []
||Sent: Sunday, February 03, 2002 12:30 AM
||Subject: RE: testing virtual hosts
||> -----Original Message-----
||> From: Jarecsni János []
||> I would like to test vhosts in my development environment. So
||eg. I'd like
||> to set up for playing as Host1 and to be Host2. I
||> tried
||> <VirtualHost>
||>     ServerAdmin
||>     ServerName scorpio
||>     ServerPath /test0
||>     DocumentRoot /test0
||>     ErrorLog logs/test0-error_log
||>     CustomLog logs/test0-access_log common
||> </VirtualHost>
||> but it didn't work. I tried a few other ways then I gave up :) Is it
||> possible to set up such a test environment?
||You aren't being very descriptive about exactly what you tried and exactly
||what the results were.
||Why don't you use name-vhosts rather than IP?  The configuration
|would look
||like the example here:
||Then you just add the appropriate names mapped to the IP address in
||The official User-To-User support forum of the Apache HTTP Server Project.
||See <URL:> for more info.
||To unsubscribe, e-mail:
||For additional commands, e-mail:

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message