简体   繁体   English

Azure Front Door - 如何使用默认后端主机名自定义域?

[英]Azure Front Door - how to custom domain with default backend host name?

I have an azure app service which enabled custom domain as "www.mysite.com" , we would like to set up a web application firewall on front door to protect slow read http attack.我有一个 azure 应用程序服务,它启用了自定义域“www.mysite.com” ,我们想在前门设置一个 web 应用程序防火墙来保护慢读 http 攻击。

After setting up Azure Front Door, my front end host is shown as "mysite.azurefd.net" , and the issue of slow read http attack was gone, which is perfect!设置Azure Front Door后,我的前端主机显示为“mysite.azurefd.net” ,http攻击慢读问题消失了,完美!

But the new problem is, we want to custom front end host to "www.mysite.com" which eventually forwards/redirects to app service with the same domain name, not the default "mysite.azurefd.net" .但新的问题是,我们希望将前端主机自定义为“www.mysite.com” ,最终转发/重定向到具有相同域名的应用服务,而不是默认的“mysite.azurefd.net” Because i always want user goes through front door to delivery request to my Azure app service因为我总是希望用户通过前门向我的 Azure 应用服务发送请求

Is this doable?这是可行的吗?

just add the custom domain name to the front door and point your dns servers to the front door and you are done. 只需将自定义域名添加到前门,然后将dns服务器指向前门即可。

https://docs.microsoft.com/en-us/azure/frontdoor/front-door-custom-domain https://docs.microsoft.com/zh-cn/azure/frontdoor/front-door-custom-domain

But the new problem is, we want to custom front end host to "www.mysite.com" which eventually forwards/redirects to app service with the same domain name, not the default "mysite.azurefd.net". 但是新的问题是,我们希望将前端主机自定义为“ www.mysite.com”,该主机最终将转发/重定向到具有相同域名的应用程序服务,而不是默认的“ mysite.azurefd.net”。

You can add a custom name to your Azure front door frontend host name but you can not add the same domain name as the custom domain in your app service as A CNAME record is not allowed to coexist with any other data from RFC1912 section 2.4 您可以将自定义名称添加到Azure前门前端主机名,但不能the same domain name应用服务中的自定义域添加the same domain name ,因为CNAME记录不允许与 RFC1912第2.4节中的任何其他数据共存

In this case, you have to add a different domain like sub.mysite.com as the frontend host to your Azure front door like this , then add or update an existing routing rule that map frontend hosts sub.mysite.com with your path like /* to your existing backend pool of web app. 在这种情况下,你必须像添加不同的域sub.mysite.com为前端主机到您的Azure的前门喜欢这样 ,然后添加或更新现有的路由规则,地图前端主机sub.mysite.com与路径一样/*到您现有的Web应用程序后端池。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM