Thanks for your quick response. I have tried to configure two name-based virtual hosts on my server machine: server5.com and server6.com. In the request, I specified "Host: whatever.com". The server still sends a page back from server5.com. How do I enforce the server to send some negative message (e.g. 404 Not Found) back to the client if the Host: field value is not configured on the server as a virtual host?

Thanks,
Khoa

On 8/18/05, Ivan Barrera A. <[EMAIL PROTECTED]> wrote:
Khoa Nguyen wrote:
> Hi,
>
> I don't quite understand the use of the Host: header field in HTTP 1.1
> request. For example, I wrote a simple script to connect to
> www.google.com <http://www.google.com> on port 80. After the connection,
> I send the following GET request:
>
> GET / HTTP/1.1
> Host: whatever.com <http://whatever.com>
> ...
>
> The web server doesn't seem to care what I put in the Host field and
> always returns the google home page. Is this behaviour acceptable? Why a
> HTTP 1.1 web server insists on the presence of a Host field but doesn't
> seem to do any kind of checking on it?

What if you have the same index for all vhosts ?
What if you are using just 1 vhost (so, the default one) ?

It isn't a matter of HTTP/1.1 spec. It is a matter on how you configure
your webserver.

>
> Thanks,
> Khoa

---------------------------------------------------------------------
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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to