How can we improve Azure Networking?

Allow IIS Hostname binding support in Azure Application Gateway

Right now, when you try to use Azure Application Gateway with an IIS farm with an host name as binding (ie: www.contoso.com), you get an error 502: bad gateway while trying to reach the web application. (considering use of classical VM).

Without an hostname, the service works perfectly with the port binding, but does not allow sharing the web farm between multiple IIS sites by using the hostname (ie: www.contoso.com side-by-side with www.microsoft.com).

I know that it would be better to use Azure websites, but it's not possible when moving some old LOB web applications that require local dependencies.

Can you add support of IIS Hostname binding in Azure Application Gateway ?

10 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Guillaume Lacaille shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    9 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • Chen Xu commented  ·   ·  Flag as inappropriate

        I had the same issue, I was going to setup an application gateway in front of WebApp, which seems to be running under a multi-host configured IIS, and the whole setup doesn't work.
        By adding a customized probe I got a green light in "Backend health" page, but actual access of the URL returns 404, which is the result if you access WebApp host with IP address instead of hostname.

      • martinmasse.x commented  ·   ·  Flag as inappropriate

        I had this issue this morning. I was able to make it work by having at least one IIS binding without a hostname. Otherwise, the default probe failed and you get a 502.

      • Paul Touzel commented  ·   ·  Flag as inappropriate

        I agree with the comment dated Oct 24, this change doesn't seem to be what was asked for. I want to be able to host both contoso.com and microsoft.com say on the same backend VM- I don't want a separate VM for each.

      • Anonymous commented  ·   ·  Flag as inappropriate

        The template referred to above does indeed set up multiple sites on a single Application Gateway but then uses different back end IP addresses. It seems to me that the original question relates to using host headers (therefore multiple sites) on a single back-end IP address.

        For example, a single internal IIS server is hosting multiple sites on port 80 and each has a host header configured. Internally they work as expected but basically this same configuration needs to be replicated on the Application Gateway.

        Additionally, securing these same sites on the same single IP address with separate certificates but all using the same port (and therefore Server Name Indication) works fine on the IIS server but what is the appropriate configuration for an Application Gateway?

        All attempts to achieve this are met with a 502, whether using HTTP or HTTPS.

      • Ross Taylor commented  ·   ·  Flag as inappropriate

        Is multisite support enabled yet? if so, could you please point me in the direction of the documentation because I cannot figure out how to make it work in classic or ARM modes. Thanks.

      Feedback and Knowledge Base