question

SamGooch-8503 avatar image
0 Votes"
SamGooch-8503 asked NarayanGuragain-8801 commented

Use the same Custom Domain for an App Service within the same scale unit behind an Application Gateway

I need to add a custom domain to two App Services running on the same App Service Plan. In front of them both, sits an Application Gateway which the DNS is configured to route to.

The reason I need a custom domain is because the applications are expecting that custom domain to be present and it affects the routing and URL behaviour from the CMS application.

Please advise how best to do this?

azure-webappsazure-webapps-custom-domains
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @SamGooch-8503,

Just checking to see if the below response helped answer your question.

Thanks,

Grace

0 Votes 0 ·

In your diagram, what if the ImageServerPool and the VideoServerPool both need the domain to be contoso.com for it to route correctly? How would you do that? I can't use the *.azurewebsites.net domains.

0 Votes 0 ·

1 Answer

Grmacjon-MSFT avatar image
0 Votes"
Grmacjon-MSFT answered NarayanGuragain-8801 commented

Hi @SamGooch-8503

Thanks for your patience.

Yes, your scenario can be achieved using URL path-based routing via Application Gateway. Please follow this tutorial:
Create an application gateway with path-based routing rules using the Azure portal.

81997-figure1.png

Another option could be deploying your web apps to multiple virtual directories. Read this Blog post and SO post for more details.

Hope that helps.
-Grace



figure1.png (86.3 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I want to have www.contoso.com/api1 and www.contoso.com/api2 in backend pool.
I have path-based routing set up in Application Gateway. Now I am stuck at authentication part.
Is it possible to authenticate each of them from Azure Active Directory?
Can I use the same custom domain for both web apps in the backend?
What would be best return url for each of them after authenticating requests from Azure Active directory?
Is that feasible at all?
Any suggestions/hints would be greatly appreciated.

0 Votes 0 ·