502 bad gateway error - connecting internal APIM endpoints via application gateway
When connecting to API manager endpoints via application gateway throws 502 bad gateway error.
A subset of the internally deployed APIM endpoints need to be exposed to the external users. Therefore, a public application gateway being used to route the traffic to the APIM backend apis. A new listener is configured in the application gateway to accept the traffic. Also, same SSL certificate is uploaded to application gateway listener and APIM. The SSL certificate has multiple SANs to resolve apim developer portal, gateway and apim. The APIM endpoints are secured with a JWT token. So, a valid JWT token is required for accessing any apim endpoints.
The main issue is, unable to get any details of 502 bad gateway error.
Trying to do the below.