Error 502 while using Application Gateway with App Service Environment

%3CLINGO-SUB%20id%3D%22lingo-sub-92049%22%20slang%3D%22en-US%22%3EError%20502%20while%20using%20Application%20Gateway%20with%20App%20Service%20Environment%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-92049%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20setup%20Application%20Service%20environment%20and%20trying%20to%20access%20WebApps%20inside%20App%20service%20environment%20through%20Application%20gateway.%20%26nbsp%3BBelow%20are%20the%20steps%20I%20followed%20to%20create%20required%20setup%20however%20I%20am%20getting%20%22502%20-%20Web%20server%20received%20an%20invalid%20response%20while%20acting%20as%20a%20gateway%20or%20proxy%20server%22%20error%20when%20I%20hit%20the%20URL%20that%20is%20mapped%20with%20application%20gateway%20public%20URL%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E1)%20Created%20Vnet%20and%20created%20App%20Service%20environment%20inside%20separate%20subnet%2C%20used%20subdomain%20name%20as%20dev.xyz.com.%20I%20used%20ILB%20wild%20card%20certificate%20here%20issued%20to%20*.xyz.com%3C%2FP%3E%3CP%3E2)%20Created%20app%20inside%20App%20service%20environment%20and%20named%20it%20as%20%22%3CSPAN%3Edev-web.dev.xyz.com%22%20and%20added%20externally%20accessible%20DNS%20name%20in%20the%20custom%20domain%20as%20%22dev-web.xyz.com%22%3C%2FSPAN%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E3)%20Created%20Application%20gateway%2C%20added%20Internal%20IP%20address%20of%20ILB%20(%20App%20Service%20Environment)%20as%20back%20end%20pool%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E4)%20Created%20App%20Gateway-HTTP%20Settings%20using%20port%2080%20and%20mapped%20it%20with%20custom%20probe%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E4)%20%26nbsp%3BCreated%26nbsp%3BApp%20Gateway-CustomProbe%2C%20host%20name%20used%20here%20is%20extenally%20accessible%20DNS%20name%20which%20is%20%22dev-web.xyz.com%22%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E5)%20Created%26nbsp%3BApp%20Gateway-Listner%20%26nbsp%3Busing%20host%20name%20as%20extenally%20accessible%20DNS%20name%20which%20is%20%22dev-web.xyz.com%22%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E6)%20Added%20a%20basic%20rule%20and%20mapped%20above%20resources%20with%20each%20other%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20am%20still%20not%20able%20to%20access%20my%20Web%20App%20after%20acessing%20dev-web.xyz.com%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20am%20not%20sure%20about%20how%20port%20number%20used%20to%20create%20listner%20affect%20the%20setup%20or%20if%20%26nbsp%3BI%20am%20missing%20anything.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20also%20want%20to%20implement%20SSL%20once%20I%20am%20done%20with%20above%20testing%2C%20I%20would%20appretiate%20inputs%20on%20how%20to%20implement%20that%20for%20above%20setup.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-92049%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EApplication%20Gateway%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

Hello,

 

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

4)  Created App Gateway-CustomProbe, host name used here is extenally accessible DNS name which is "dev-web.xyz.com" 

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

6) 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.

0 Replies