On Thu, 7 Jun 2001, "Rich C" <[EMAIL PROTECTED]> wrote:
> 
> How do you differentiate the two web servers on the outside (public
> network?)
> 
> What are their web addresses? If you only have one IP, that can only resolve
> to one host name on the DNS. How does a user "point" to each web?

I don't know if this helps with your question, but most browsers send
along the "Host:" header in the request:

 GET /index.html HTTP/1.0
 Connection: Keep-Alive
 User-Agent: Mozilla/4.04 [en] (X11; U; Linux 2.1.88 i686)
 Host: www.someplace.com     <==== the Host header =====
 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
 Accept-Language: en
 Accept-Charset: iso-8859-1,*,utf-8

So a single webserver listening on port 80 can use this piece of info
to distinguish requests, and route them appropriately, etc.

This trick won't work for older browsers...

I believe the "Host:" header is a requirement for HTTP/1.1 communications.
(see example below)

Karl


--------------
Example: I sent GET /index.html HTTP/1.1 but I don't provide Host: header.
It works if I include "Host: www.gnhlug.org"

haystack[112] telnet www.gnhlug.org 80
Trying 206.183.140.186...
Connected to appropriate.gnhlug.org.
Escape character is '^]'.
GET /index.html HTTP/1.1

HTTP/1.1 400 Bad Request
Date: Thu, 07 Jun 2001 16:28:16 GMT
Server: Apache/1.3.19 (Unix) PHP/4.0.5 DAV/1.0.2
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1

185
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>400 Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that this server could not understand.<P>
client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): 
/index.html<P>
<HR>
<ADDRESS>Apache/1.3.19 Server at md.appropriatesolutions.com Port 80</ADDRESS>
</BODY></HTML>

0



**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************

Reply via email to