I'd like to host multiple domains and handle subdomain wildcards. Is this possible to do with a single app gateway?
For example, here are the listeners I am attempting to setup:
The problem that I'm running into is when I go to add the second app gateway listener I get an error indicating that it can only have 1 "basic" type. If I attempt to create a second listener with a * I get an error indicating that it's an invalid host value. Is there a better way to configure this type of routing that maybe I'm missing?
Of course, you can host multi-sites and subdomain wildcards in a single application gateway. Take a look at the Application Gateway multiple site hosting. But it's just a preview version, and this feature is in preview and is available only for Standard_v2 and WAF_v2 SKU of Application Gateway. It notes:
This feature is currently available only through Azure PowerShell and Azure CLI. Portal support is coming soon. Please note that since portal support is not fully available if you are using only the HostNames parameter, the listener will appear as a Basic listener in the portal and the Host name column of the listener list view will not show the host names that are configured.
The CLI command az network application-gateway http-listener create
works on the subdomain wildcards with parameter host-names
.