Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

share|improve this question

3 Answers 3

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.

share|improve this answer

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

share|improve this answer
1  
I followed these instructions here: 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 servername or ipaddress in my browser I'll get the Bad Request error message. –  joeqwerty Jan 20 '10 at 19:58
up vote 0 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.