在流量管理器和Web应用程序上配置自定义域 [英] Configuring custom domain on traffic manager and web app

查看:105
本文介绍了在流量管理器和Web应用程序上配置自定义域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我推荐了这个微软文档,但是很疯狂.

I refferred this microsoft doc, but it's confusing as mad.

https ://docs.microsoft.com/zh-CN/azure/app-service/web-sites-traffic-manager-custom-domain-name

首先,他们解释www.contoso.com将是<myapp>.trafficmanager.netCNAME.然后,当网络应用程序出现时,他们说www.contoso.com将是网络应用程序的CNAME.他们没有解释两者将如何工作.当我将主机名www.contoso.com添加到Web应用程序时,它将覆盖流量管理器的CNAME记录.因此,下次我点击www.contoso.com时,它将转到Web应用程序.交通管理器无法显示图片.如果我要为流量管理器添加抢占记录,例如awverify.www.contoso.com CNAME<myapp>.trafficmanager.net,我应该在浏览器中键入哪个URL来访问流量管理器,然后到达Web应用程序?

First they explain www.contoso.com will be the CNAME for <myapp>.trafficmanager.net. Then when web apps comes to picture they say www.contoso.com will be the CNAME for web app. They don't explain how both will work. When I will add hostname www.contoso.com to web app it is going to override the CNAME record for traffic manager. So next time I will hit www.contoso.com, it will go to web apps. Traffic manager went out of picture. If I will add preemptive record for traffic manager for e.g awverify.www.contoso.com CNAME to <myapp>.trafficmanager.net, what URL should I hit in browser to reach traffic manager and then to web app?

推荐答案

对于本文中的混淆表示歉意.我们将对其进行更新以使步骤更清晰,但同时,希望下面的信息对您有所帮助.

apologies for the confusion in the article. We will update it to make the steps clearer, but in the meantime, hope the info below helps you.

创建Azure Web应用程序时,该应用程序将具有其自己的DNS名称.azurewebsites.net.如果您有多个Web应用程序,则每个应用程序都将获得自己的DNS名称.我们称它们为端点DNS名称.

When you create an Azure Web App, the app will have its own DNS name .azurewebsites.net. If you have multiple web apps, each will get their own DNS name. Let's call them the endpoint DNS names.

Azure Traffic Manager可用于在这些终结点之间定向流量(例如,您在不同Azure区域中拥有网站,并希望将流量发送到用户的最低延迟位置).为此,您首先创建一个流量管理器配置文件,并将这些终结点DNS名称添加为终结点.该流量管理器配置文件还带有其自己的DNS名称.trafficmanager.net.当您将网站终结点添加到流量管理器配置文件时,该流量管理器DNS名称将添加到Web应用程序支持的自定义主机名列表中.这意味着,如果有人使用流量管理器DNS名称(应该使用该名称来获得流量路由优势)导航到您的网站,则Web应用将正确响应.

Azure Traffic Manager can be used to direct traffic between these endpoints (an example would be you have websites in different Azure regions and would like to send traffic to the lowest latency location for the user). In order to do that, you first create a Traffic Manager profile and add these endpoint DNS names as the endpoints. This Traffic Manager profile also comes with its own DNS name .trafficmanager.net. When you add websites endpoints to a Traffic Manager profile, that Traffic Manager DNS name is added to the list of custom hostnames supported by the web app. What this means is that if someone navigates to your website using the Traffic Manager DNS name (which they should use to get the traffic routing benefits), the web app will respond correctly.

如果要将自己的品牌添加到分发给最终用户的URL,则可以使用虚名域名(例如www.contoso.com)并将其托管在DNS托管服务(例如Azure DNS)中.您需要在此处执行的操作是将CNAME记录添加到contoso.com区域,以使其指向流量管理器DNS名称.一个例子是

If you want to add your own branding to the URL you hand out to end users, you can use a vanity domain name like www.contoso.com and host it in a DNS hosting service such as Azure DNS. What you need to do here is to add a CNAME record to your contoso.com zone to point that to the Traffic Manager DNS name. An example would be

www.contoso.com. 60 IN CNAME contosotm.trafficmanager.net.

www.contoso.com. 60 IN CNAME contosotm.trafficmanager.net.

执行此操作时,对www.contoso.com的任何请求都将被重定向到流量管理器DNS名称,该名称随后将选择一个Web应用程序DNS名称,并将其返回给呼叫者以进行连接.为了使其正常工作,您需要确保已将www.contoso.com添加到每个Web应用程序的自定义域列表中.

When you do this, any requests to www.contoso.com will be redirected to the Traffic Manager DNS name which will then pick a web app DNS name and give it back to the caller to connect to. In order for this to work, you need to make sure that you have added www.contoso.com to the custom domain list of each of the web apps.

这篇关于在流量管理器和Web应用程序上配置自定义域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆