httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zac Stevens <...@cryptocracy.com>
Subject Re: [users@httpd] vhost, again and agina :) - shreding my shoulders
Date Tue, 27 Aug 2002 11:29:02 GMT
On Tue, Aug 27, 2002 at 02:19:02PM +0300, Hytham Shehab wrote:
> so far so good, then i run IE 5.5 and type www.server-1.com, it goes to
> server-1, if i type www.server-2.com, it goes to server-2, just fine, - i
> know that some of you now are thinkg that i just have a plenty of time, no
> guys, here is the problem -, when i do this:
> telnet www.server-1.com 80, it goes to server-1
> telnet www.server-2.com 80, it goes to *server-1*, why????

How were you testing this?  I suspect you may not be using the Host:
header, which is what Apache uses to determine the VirtualHost to give the
request to.  Telnet itself works on a lower layer than VirtualHosts exist
at.

try the following:

telnet www.server-1.com 80
GET / HTTP/1.1
Host: www.server-1.com
<CR><CR>

telnet www.server-1.com 80
GET / HTTP/1.1
Host: www.server-2.com
<CR><CR>

You should get responses from the Virtualhosts whose ServerName/ServerAlias
matches the Host: header.

I don't believe the syntax you used for ServerPath is correct, but if for
example you had the following in your Server1 vhost

ServerPath /server1/

you could also modify the URI you're requesting to begin with /server1/

eg:

telnet www.server-2.com 80
GET /server1/ HTTP/1.0
<CR><CR>

should give you the root of server-1.


HTH,


Zac

---------------------------------------------------------------------
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


Mime
View raw message