0
votes

I have setup Application Service environment and trying to access WebApps inside App service environment through Application gateway. Below are the steps I followed to create required setup however I am getting "502 - Web server received an invalid response while acting as a gateway or proxy server" error when I hit the URL that is mapped with application gateway public URL

  1. Created Vnet and created App Service environment inside separate subnet, used subdomain name as dev.xyz.com. I used ILB wild card certificate here issued to *.xyz.com
  2. Created app inside App service environment and named it as "dev-web.dev.xyz.com" and added externally accessible DNS name in the custom domain as "dev-web.xyz.com"
  3. Created Application gateway, added Internal IP address of ILB ( App Service Environment) as back end pool
  4. Created App Gateway-HTTP Settings using port 80 and mapped it with custom probe
  5. Created App Gateway-CustomProbe, host name used here is extenally accessible DNS name which is "dev-web.xyz.com"
  6. Created App Gateway-Listner using host name as extenally accessible DNS name which is "dev-web.xyz.com"
  7. Added a basic rule and mapped above resources with each other

I am still not able to access my Web App after acessing dev-web.xyz.com

I am not sure about how port number used to create listner affect the setup or if I am missing anything.

I also want to implement SSL once I am done with above testing, I would appretiate inputs on how to implement that for above setup.

2

2 Answers

0
votes

Created App Gateway-Listner using host name as extenally accessible DNS name which is "dev-web.xyz.com"

After created your App Gateway, a default listener is created to bind the front end IP and port 80 for you. The listener means the App Gateway will monitor the requests which were send to the IP address and port and forwarding the requests to the backend resources. Since you add a host name 'dev-web.xyz.com' as its listener. The App Gateway will also monitor the requests which were send to the host. It will cause a infinite loop forwarding due to the listener host is also marked as the backend host.

To fix the error, you need to remove the App Gateway-Listener record which you added.

0
votes

I was able to resolve the issue by mapping correct port for the listener. Listener won't harm if you have correct rule setup in the configuration.