What's the correct way to set up multiple Web Apps behind Azure Front Door?

会有一股神秘感。 提交于 2020-07-10 10:46:25

问题


I have three backend pools, 1 is an API and 2 are Web Apps. I've set up routing in Azure Front Door to route to the correct areas, but how do I modify the web apps to use the Front Door URL for all of the links without having to hardcode them all manually?

For example, if the Front Door URL is frontdoor.azurefd.net but Web App 1 is published to webapp1.azurewebsites.net how can I set the root url of webapp1 such that all of the Razor Areas actually link to frontdoor.azurefd.net/webapp1?


回答1:


If you want to access the different backend pool based on the path URL with Azure front door, you must make sure the virtual path existence. For example, you have to add the virtual directory /webapp1 in your app service like this:

So you could access your webapp1 via URL https://xxx.azurewebsites.net/webapp1. Then you could add /webapp1/* or /webapp1 in the PATTERNS TO MATCH and modify the Forwarding protocol is match request in your routing rule.

After this, you could access the URL frontdoor.azurefd.net/webapp1 for your webapp1. The same configuration is for the other two backends and routing rules.

For more reference: https://docs.microsoft.com/en-us/azure/frontdoor/front-door-route-matching



来源:https://stackoverflow.com/questions/56877692/whats-the-correct-way-to-set-up-multiple-web-apps-behind-azure-front-door

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!