Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bad Request - Invalid Hostname IIS7

Tags:

iis-7

When I try to hit my web app on port 8080 I get the following error

Bad Request - Invalid Hostname
HTTP Error 400. The request hostname is invalid.

I don't even know where to begin to diagnose this problem

like image 956
burnt1ce Avatar asked Jan 28 '11 17:01

burnt1ce


People also ask

How do I fix a bad request invalid hostname?

The issue occurs because IWSVA overwrites the Host header in the HTTP request with the IP or FQDN of the web server configured in IWSVA. To resolve the issue, configure IWSVA not to overwrite the Host header: Open the /etc/iscan/intscan. ini configuration file of IWSVA and set “ProxyPreserveHost" to "yes".

What is HTTP Error 400 the request hostname is invalid?

Although for experienced sysadmins this is obviously not a network problem since there was a response, at the same time the code 400 indicates a client side issue (something wrong with the request) but sometimes it can happen due to a server misconfiguration (the site hostname it connects to).

What is an invalid hostname?

If your server shows "Invalid hostname" in the server-list when attempting to query. If your server shows "Invalid Hostname" when querying on the serverlist, this usually means you are accessing a domain (or IP) pointed to our network, but not actually registered within our database.


1 Answers

Did you check the binding is IIS? (inetmgr.exe) It may not be registered to accept all hostnames on 8080.

For example, if you set it up for mysite.com:8080 and hit it at localhost:8080, IIS will get the request but not have a hostname binding to match so it rejects.

Outside of that, you should check the IIS logs (C:\inetpub\logs\wmsvc#) on the server and see if you are seeing your request. Then you'll know if its a problem on your client or on the server itself.

like image 106
Taylor Bird Avatar answered Sep 20 '22 21:09

Taylor Bird



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!