0

I've set up a site within IIS with default settings. I consitently get "Bad Request (Invalid Hostname). I get it from a client, or even while browsing from IE on the server.

Can anyone point me in the right direction?

Thanks

Travis Johnson
  • 101
  • 1
  • 1
  • 3

3 Answers3

1

IIS gives that error when it cannot find a web site in its settings configured with the IP address and hostname combination you used to connect. It's possible that the web site was configured with a specific IP and hostname, but the hostname you're using to connect is different (i.e. example.com vs. www.example.com). If the web site has a dedicated IP address on the server you can edit the configuration to use the IP only without a specific hostname and it will answer any requests on that IP. If the IP is shared you will need to configure all of the hostnames that can be used to access the site.

Justin Scott
  • 8,748
  • 1
  • 27
  • 39
0

Do you have host headers configured on the web site? Is the server dual-homed?

joeqwerty
  • 108,377
  • 6
  • 80
  • 171
  • 1
    I followed these instructions here: http://www.visualwin.com/host-header/ Everything seems right, and I know my domain is pointed to the appropriate IP address (at least the ping brings up the right IP in my command prompt). Not sure what "dual-homed" means. I am on a Windows VPS, but I don't think that should make any difference. Oh, and of course I have a dedicated IP address to my VPS. – Travis Johnson Jan 20 '10 at 19:18
  • So you're saying that you did set up host headers on the web site? If so, are you typing the value of the hostheader in your browser when trying to access the site? If not, that would explain the Bad Request error. When using host headers the web site will only respond with the default page to browsers that pass the matching host header string. So if my host header is www.domain.com and I type http://servername or http://ipaddress in my browser I'll get the Bad Request error message. – joeqwerty Jan 20 '10 at 19:58
0

Well, I re-imaged my VPS, and started my setup process again. I was more cautious to watch for when things went awry. Turns out, it was my PHP installation. Doh!

Thanks for the help, thought I would close this out.

Travis Johnson
  • 101
  • 1
  • 1
  • 3