EC2/Route53:如何将 Apex 记录指向负载均衡器? [英] EC2/Route53: How Do I Point Apex Record at Load Balancer?

查看:32
本文介绍了EC2/Route53:如何将 Apex 记录指向负载均衡器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在亚马逊中,我试图为一个域创建一个 cname,

In Amazon, I am attempting to create a cname for a domain,

example.com 

到 Route 53 中的负载均衡器

to a load balancer in Route 53

Examplecom-1058462749.us-west-2.elb.amazonaws.com

但是当我尝试保存记录时,出现此错误:

But when I try to save the record, I get this error:

RRSet of type CNAME with DNS name example.com. 
is not permitted at apex in zone example.com.

当我尝试将其设为 A 记录时,我遇到了类似的问题:

And when I try to make it an A record, I get a similar issue:

The record set could not be saved because:
- The Value field contains invalid characters 
or is in an invalid format.    

因为负载均衡器的公共DNS不是ipv4地址.我究竟做错了什么?我怎样才能让 example.com 指向负载均衡器?请注意,我确实成功地为 www.example.com 创建了一个 cname 到负载均衡器公共 dns.

Because the public DNS of the load balancer is not an ipv4 address. What am I doing wrong? How can i get example.com to point to the load balancer? Note, I did successfully created a cname for www.example.com to the load balancers public dns.

推荐答案

http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/CreatingAliasRRSets.html

您不使用 CNAME,而是使用配置为 ELB 别名的 A 记录.

You don't use a CNAME, you use an A record configured as an ALIAS for the ELB.

当您在创建 A 记录时将别名设置为是"时,您将看到一个框,您可以在其中选择 ELB,其内部信息将用于为别名提供答案.

When you set Alias to "Yes" while creating the A record, you will then see a box where you select the ELB whose internal info will be used to serve up answers for the alias.

别名是 Route 53 的一项功能,旨在完全支持您尝试执行的操作.

Aliases are a Route 53 feature designed to support exactly what you are trying to do.

这篇关于EC2/Route53:如何将 Apex 记录指向负载均衡器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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