Re: WEB server

From: James Ventre (messageboard@ventrefamily.com)
Date: Fri Apr 01 2005 - 14:35:24 GMT-3


Host Headers are very useful if you want to run multiple web sites on
the same machine - all on port 80.

James

Alexander Arsenyev (GU/ETL) wrote:

>Hello,
>
>Just did it on our webserver and indeed, it behaves the same!
>Fired up the Ethereal and the problem is easy to spot:
>
>-when webserver hostname is used, the client puts the webserver hostname into the host field of GET request:
>Hypertext Transfer Protocol
> GET / HTTP/1.1\r\n
> Request Method: GET
> Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*\r\n
> Accept-Language: en-gb\r\n
> Accept-Encoding: gzip, deflate\r\n
> User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)\r\n
> Host: hostname.webserver.com\r\n
> Connection: Keep-Alive\r\n
> \r\n
>and the connection succeeds :-)
>
>-when webserver IP address is used, it is also put into the same field:
>Hypertext Transfer Protocol
> GET / HTTP/1.1\r\n
> Request Method: GET
> Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*\r\n
> Accept-Language: en-gb\r\n
> Accept-Encoding: gzip, deflate\r\n
> User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)\r\n
> Host: 10.1.1.1\r\n
> Connection: Keep-Alive\r\n
> \r\n
>
>but this time the webserver replies with HTTP 400 BAD REQUEST and the explanation follows in the separate packet:
>Hypertext Transfer Protocol
> Data (129 bytes)
>
>0000 3c 48 54 4d 4c 3e 3c 48 45 41 44 3e 3c 54 49 54 <HTML><HEAD><TIT
>0010 4c 45 3e 49 6e 76 61 6c 69 64 20 48 6f 73 74 20 LE>Invalid Host
>0020 53 70 65 63 69 66 69 65 64 3c 2f 54 49 54 4c 45 Specified</TITLE
>0030 3e 3c 2f 48 45 41 44 3e 0d 0a 3c 42 4f 44 59 3e ></HEAD>..<BODY>
>0040 54 68 65 20 72 65 71 75 65 73 74 20 64 69 64 20 The request did
>0050 6e 6f 74 20 73 70 65 63 69 66 79 20 61 20 76 61 not specify a va
>0060 6c 69 64 20 76 69 72 74 75 61 6c 20 68 6f 73 74 lid virtual host
>0070 2e 3c 2f 42 4f 44 59 3e 3c 2f 48 54 4d 4c 3e 0d .</BODY></HTML>.
>0080 0a .
>
>HTH,
>Cheers
>Alex
>#13405
>
>-----Original Message-----
>From: nobody@groupstudy.com [mailto:nobody@groupstudy.com]
>Sent: 01 April 2005 18:07
>To: ccielab@groupstudy.com
>Subject: OT: WEB server
>
>
>Hi,
>
>Sorry for the OT.
>I knew there is someone who can answer this here in this group.
>
>I am trying to figure out something I am not very familiar with.
>
>There is a web server that is accessible if you browse is through your web
>brouser by typing its URL as usual. But here I have a problem.
>I am trying to access this web server by typing its IP address that I pulled
>by nslookup and this server does not respond by this method as most of them
>do.
>
>Does anyone know why this happens??
>
>Thanks in advance.
>
>Yuki
>
>_________________________________________________________________
>FREE pop-up blocking with the new MSN Toolbar - get it now!
>http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
>
>_______________________________________________________________________
>Subscription information may be found at:
>http://www.groupstudy.com/list/CCIELab.html
>
>_______________________________________________________________________
>Subscription information may be found at:
>http://www.groupstudy.com/list/CCIELab.html



This archive was generated by hypermail 2.1.4 : Tue May 03 2005 - 07:54:51 GMT-3