httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jarecsni János <jarecsni.ja...@chello.hu>
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:

	127.0.0.10 adam.scorpion.vhost
	127.0.0.10 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>
<VirtualHost *>
    DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs/eve"
    ServerName eve.scorpion.vhost
</VirtualHost>

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, testhost.com with
IP address 127.0.0.10 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?

Cheers,
János


|-----Original Message-----
|From: Jarecsni János [mailto:jarecsni.janos@chello.hu]
|Sent: Monday, February 04, 2002 10:44 AM
|To: Joshua Slive [joshua@slive.ca]
|Subject: RE: testing virtual hosts
|
|
|Thanks very much! That's what I need! :)
|
|János
|
||-----Original Message-----
||From: Joshua Slive [mailto:joshua@slive.ca]
||Sent: Sunday, February 03, 2002 12:30 AM
||To: users@httpd.apache.org
||Subject: RE: testing virtual hosts
||
||
||
||
||> -----Original Message-----
||> From: Jarecsni János [mailto:jarecsni.janos@chello.hu]
||
||> I would like to test vhosts in my development environment. So
||eg. I'd like
||> to set up 127.0.0.10 for playing as Host1 and 127.0.0.20 to be Host2. I
||> tried
||>
||> <VirtualHost 127.0.0.1>
||>     ServerAdmin jarecsni.janos@chello.hu
||>     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:
||http://httpd.apache.org/docs/vhosts/name-based.html
||Then you just add the appropriate names mapped to the IP address in
||/etc/hosts.
||
||Joshua.
||
||
||---------------------------------------------------------------------
||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
||For additional commands, e-mail: users-help@httpd.apache.org
||
||


---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message