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?