4
votes

I have an WAF application gateway in Azure with a backend pool that points to my application. If I visit the gateway address it works and I get the application homepage.

However, if I go to that application and enable PaaS AAD Authentication, which should prompt me with an org login page before getting to my application home page, the gateway stops working and returns message:

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 content server, it received an invalid response from the content server.

When checking backend health I can now see that it is unhealthy, and gives me message:

Probe status code mismatch. Received status code is different from expected 100-999.

Note that I even changed the range to 100-999, just for testing this out. No idea what could be causing this or how to fix it.

1
Hi @Green_qaue , I did a test in my lab and everything works fine. Can you try to disable the WAF to check if it's about the WAF? Also, if possible, you can post more details about your Application gateway configuration.Wayne Yang

1 Answers

0
votes

I guess you can try disabling WAF as specified in the comments. Also, I would suggest you to go through this article. https://serverfault.com/questions/882931/azure-ssl-application-gateway-with-web-apps?rq=1