Is there a requirement for listener hostnames and backend hostnames to be the same when integrating application gateway and api management on internal vnet?

Mark Fisher 1 Reputation point
2022-07-29T18:00:20.603+00:00

I have an azure application gateway with api management set up per instructions here: https://learn.microsoft.com/en-us/azure/api-management/api-management-howto-integrate-internal-vnet-appgateway

The only difference is I am trying to create a setup where the application gateway is listening for public traffic on api-southcentralus.<somedomainname>.com, and then forwarding those requests to a backend pool with hostname api.<somedomainname>.com, where api.<somedomainname>.com internally is mapped to the private IP of the api management (and the same setup for portal and management hostnames).

With this setup, the gateway probes report healthy. But the issue I run into is from api management, the link to open the admin developer portal tries to open the portal at portal.<somedomainname>.com, which doesn't exist publicly. Even if I manually edit the URL in the browser to say portal-southcentralus, the portal fails to load because behind the scenes it makes some requests to management API also using the hostname that doesn't exist publicly.

Every example I've found on Microsoft Learn so far has used the same hostname for the backend api management hostnames and the hostnames for which app gateway listens for public traffic, but I haven't found anything in the docs that explicitly says it needs to be set up in this way. Is the setup I've described above possible? Or do those hostnames need to be the same?

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,782 questions
Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
965 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. msrini-MSFT 9,261 Reputation points Microsoft Employee
    2022-07-30T04:38:07.947+00:00

    Hi,

    Is there a requirement for listener hostnames and backend hostnames to be the same when integrating application gateway and api management on internal vnet? --> Not necessarily.

    In the HTTP setting of your Application gateway, you can rewrite the hostname to your internal API FQDN.

    Regards,
    Karthik Srinivas