IIS 7 and Above
Default Website stops working after binding to specific IP
Last post May 19, 2020 11:36 PM by The Green Ant
May 14, 2020 07:00 AM|The Green Ant|LINK
The subject doesn't fully explain the issue, but hopefully I can elaborate more here.
All servers in question are Server 2016 Datacenter with IIS role configured.
We have an IIS Server in our DMZ, publishing a URL Rewrite website to our external clients. This website is currently the only one on this server, and is using the Default Website (against my request to set up as a new site).
The URL rewrite works well and forwards the traffic to another server within our network (appropriate NAT-ing in place on firewall). This is also an IIS site.
The external site has a URL configured in DNS, which is how our clients access it.
This all works fine currently.
However, we want to set up a new Public website on this IIS instance.
So, I add the new IP address to the server.
Create a new Site in IIS, and bind the new site to the new IP address.
I then bind the existing Default site to it's own IP address (as per the DNS entry)
I double check and each website is bound to its specific IP/Port and nothing else.
I do an IISreset from admin command prompt.
The new website is now working fine.
The initial website, however, is now giving us a 502 error:
502 - Web server received an invalid response while acting as a gateway or proxy server.
There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream server, it received an invalid response from the content server.
I'm assuming there might be something on the internal server I have to change as well? I'm not sure what though.
Thanks in advance for any help.
May 15, 2020 06:41 AM|Yuk Ding|LINK
Hi The Green Ant,
What's the sub-status code of 502? Did you still get 502 error when you disable URL rewrite rule? Now that you are hosting the front-end in DMZ, did you forget to change the target domain name in outbound rule? Because, if the reverse proxy is requesting
the wrong place, IIS would probably get the bad request.
Besides, what about apply different domain for different websites? So that they can share port and public IP address.
May 19, 2020 11:36 PM|The Green Ant|LINK
Hi Yuk Ding,
I apologise for the delayed response. My email filled up quick and I missed the alert email.
The message I posted in the chat was the entire message, unfortunately. I couldn't figure out how to get more information from it. I do like to Google around a lot before I post in forums, so I didn't get much from that, as I think this is a fairly specific
I didn't actually try the rewrite rule, as it was all working fine until I added the second website, so I assumed everything was fine there.
I was also under a time constraint, so I had to reverse what I did pretty quickly.
I didn't change any of the rules, as they were working fine, and nothing changed on the destination server, it was only the client-facing one. I did look at the rules, and they did not seem to mention the source server at all, only the destination it was
redirecting to. The destination server didn't have any IP/Domain restrictions on it either that I could find (though I will probably add them in later to lock it down)
In theory, can the Default site be programmed to listen to a specific IP address?
I will arrange some downtime, and try this all again in a more structure approach.