Web App only accepting Host Header that matches custom domain of Web App

Mr J Smith 1 Reputation point
2020-04-22T10:23:36.463+00:00

I 'm using Application Gateway v2 in front of a Web App that's hosting multiple sites.

In the AppGW 'HTTP settings' under 'Host Name' there's a setting 'Override with new host name' which i have set to 'No' (so it keeps the website domain name as the host header). However this doesn't work, i get a 'Bad Gateway' error.

The website application is configured to listen for traffic from from my domain

The only way i can make it work is to use the option 'Override with a specific domain name' and enter the custom domain name of my app. This however causes problems with my website application which in certain instances (e.g. redirect) uses the Web App custom domain and not the required website domain.

Thanks in advance

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,879 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vahid Ghafarpour 17,875 Reputation points
    2023-08-26T05:38:15.3333333+00:00

    Check the listener configuration. It should be set up to listen on the specific frontend IP configuration and port that you want to use for your web apps. Ensure that the protocol (HTTP or HTTPS) and port are correct.

    1 person found this answer helpful.
    0 comments No comments