You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Brian Dessent <br...@dessent.net> on 2003/07/26 08:50:04 UTC

Re: [users@httpd] Problem with multiple virtual hosts and dynamicdns

Gregg Donley wrote:

> difference.  I guess I don't understand exactly what information
> apache uses to select the virtual host.  I
> though it was something in the http request that was sent by the
> client, but I could be wrong.  As for the

You are correct, it knows which virtual host to serve based on either
the "Host:" field sent by the client (HTTP/1.1) or the host portion of
the URL (HTTP/1.0).  If neither of these is present, it must revert to
the default domain as it has no way of knowing which virutal server the
client is referring to.  Running Ethereal (or whatever) will definitely
tell you if it's an Apache problem or not, since the headers will all be
right there.  I also suggest you get friendly with some of the command
line tools such as 'wget' or 'curl' which can be invaluable for
debugging such things.  They can print all the HTTP headers for a
session, they can be told not to follow HTTP redirects, and they
(naturally) do not know anything about framesets or any other
redirection done in the body of the page.  Therefore it's very easy to
figure out exactly what's going on and how the redirects are doing what
they're doing.

Brian

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