I have a App Gateway WAF V2 configured for both public and private IP for my Azure Web Application (this uses Azure AD Authentication to access also), when I try to access the Web App through the App Gateway Public IP Address it will open on the page "webapp.azurewebsites.net:80" which leads to the following error:
The expected behaviors is that the "webapp.azurewebsites.net" (without the port 80 at the end) will be loaded and the web app displayed, if I remove the :80 from the end of the URL it loads as expected.
These are my configurations below for the Application Gateway (My Backend Setting and Backend Pool both have the same name btw) Listeners:
Public
Private
Backend Settings
I have followed the same step and got the same error :
This site can’t provide a secure connection webappXXX.azurewebsites.net sent an invalid response. Try running Windows Network Diagnostics. ERR_SSL_PROTOCOL_ERROR
To resolve this issue, check the below workaround:
In your App service -> configuration -> General setting.
By default, your app service would have HTTPS only change to off
like below:
When HTTPS only is enabled, all HTTP traffic is redirected to HTTPS if you turn off the HTTPS only it will redirect successfully.
Note: Once you turn off, Restart the app service and make sure to clear cache on 24hr.
Now when I hit the application gateway public Ip it redirects successfully like below:
Alternatively, if you don't want to change App service you can use port 443
in Http setting and use well known certificate as yes
check the MsDoc