Re: cannot access site by IP - bad request invalid hostname
From: David Wang [Msft] (someone_at_online.microsoft.com)
Date: 09/08/04
- Next message: greg: "Re: ASP Out of Memory Errors (IISState Inc.)"
- Previous message: scott: "Re: asp session times out on IIS6 ?"
- In reply to: Mike: "cannot access site by IP - bad request invalid hostname"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 8 Sep 2004 03:34:36 -0700
Do a network trace of the requests that fail and show that.
I do not understand how your websites are set up at all --
http://xxx.xxx.xxx.70/sitename/defaultdocument
http://xxx.xxx.xxx.70/sitename2/defaultdocument
You call the above two websites, but from IIS perspective, it is one website
(bound to xxx.xxx.xxx.70). Can you give the canonical way to distinguish
between any two of what you call "website"?
i.e.
http://xxx.xxx.xxx.70/sitename/defaultdocument
host: xxx.xxx.xxx.70
vs
http://xxx.xxx.xxx.70/sitename2/defaultdocument
host: sitename2
In any case, it sounds like you have a configuration issue with your
non-standard naming scheme and not with IIS. If you create IIS websites
that listen on certain IP:Port:Host combinations and a request is made with
that information, it's going to be served by IIS. It is when your
networking/server configuration breaks those HTTP rules that you get "Bad
Request", and you must fix them. If you cannot describe your naming scheme
such that it matches how HTTP and IIS works, then a network trace is the
next best thing to show what is going on.
-- //David IIS This posting is provided "AS IS" with no warranties, and confers no rights. // "Mike" <miked@mediatechproductions.com> wrote in message news:380c6585.0409071310.16f2bef1@posting.google.com... I have a windows 2003 server running IIS 6 and am having issues accessing sites through public IP address. When setting the server up, I bound a private IP which is NAT'ed to from a public IP via my router. While in the process of moving sites from my old NT4 box to the new webserver I would test them by accessing http://xxx.xxx.xxx.69/sitename/ - which would bring up the default document so I could test before changing the DNS for these sites. No problems here. However, I now have sites that need to go on a different IP address - the next one in my block. I have NAT'ed another IP I have in my block (xxx.xxx.xxx.70) to a second private IP which I have bound on the windows 2003 server. I can get to the server fine through the IP (although getting IIS error messages), but whenever I try and test a site through http://xxx.xxx.xxx.70/sitename/ I get a "Bad Request (Invalid Hostname)" error. If I remove all host headers then IIS pulls up the site, but only if I reference just the IP address (i.e. http://xxx.xxx.xxx.70). The odd thing is that the other IP address I have setup on this server (xxx.xxx.xxx.69) I can access all of the sites on that IP (about 10 using host headers) through the IP address just fine. For example: xxx.xxx.xxx.69 --> x.x.x.188 xxx.xxx.xxx.70 --> x.x.x.189 The xxx.xxx.xxx.69 was setup initially with the server setup. The xxx.xxx.xxx.70 was added to make room for more sites. If I need to test one of the sites on the .69 IP address, I can go to http://xxx.xxx.xxx.69/sitename/defaultdocument to test before changing DNS - this has worked just fine on every site on this IP - about 10. If I try and test one of the sites on the .70 IP address, I go to http://xxx.xxx.xxx.70/sitename/defaultdocument and get "Bad Request (Invalid Hostname)" error. Both IP's are setup exactly the same on the router. Both private IP's are setup the same on the NIC card Sites in IIS have been setup the same always. Any ideas or help is greatly appreciated!
- Next message: greg: "Re: ASP Out of Memory Errors (IISState Inc.)"
- Previous message: scott: "Re: asp session times out on IIS6 ?"
- In reply to: Mike: "cannot access site by IP - bad request invalid hostname"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|