Amazon ELB CNAME 记录不起作用

发布于 2024-09-01 21:31:32 字数 729 浏览 2 评论 0原文

我已经在 ELB 实例后面设置了 EC2 基础设施,并使用 ELB DNS 名称,一切都按预期运行。现在我想使用 CNAME 条目将主项目域的子域转发到 ELB DNS 名称。我大约 12 小时前这样做了,但似乎不起作用,我不知道为什么。子域名无法解析。

这是昨天从我的 DNS 提供商处理的 DNS 条目,没有错误:

@ IN A 111.111.111.111
localhost IN A 127.0.0.1
mail IN A 111.111.111.111
www IN A 111.111.111.111
ftp IN CNAME www
beta IN CNAME myelbnamehere.eu-west-1.elb.amazonaws.com
imap IN CNAME www
loopback IN CNAME localhost
pop IN CNAME www
relay IN CNAME www
smtp IN CNAME www
@ IN MX 10 mail

使用 nslookup,所有子域和主域都能正确查找,但 beta.domain.com 却不能。我收到“** 服务器找不到 beta.domain.com: NXDOMAIN”

我做错了什么?我需要等待更长的时间吗?当我直接使用 ELB DNS 名称时,一切都按预期工作。

当我在我的提供商 DNS 服务器上执行 NSlookup 时,CNAME 得到解析,但看起来任何其他 DNS 服务器都无法找到子域,

提前致谢

I have set up my EC2 infrastructure behind an ELB instance and by using the ELBs DNS name everything works as expected. Now i wanted to forward a subdomain of my main project domain to the ELBs DNS Name with a CNAME entry. I did this about 12 hours ago and it doesnt seem to work, and i dont know why. The subdomain just cant be resolved.

This is the DNS entry which was processed from my DNS provider without errors yesterday:

@ IN A 111.111.111.111
localhost IN A 127.0.0.1
mail IN A 111.111.111.111
www IN A 111.111.111.111
ftp IN CNAME www
beta IN CNAME myelbnamehere.eu-west-1.elb.amazonaws.com
imap IN CNAME www
loopback IN CNAME localhost
pop IN CNAME www
relay IN CNAME www
smtp IN CNAME www
@ IN MX 10 mail

Using nslookup, all the subdomains and main domain gets looked up correctly, but beta.domain.com doesnt. I get "** server can't find beta.domain.com: NXDOMAIN"

What am i doing wrong ? Do i need to wait longer ? When i use the ELB DNS name directly everything works as expected.

When i do an NSlookup on my providers DNS Server, the CNAME gets resolved, but it looks like any other DNS server cant find the subdomain

thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

原野 2024-09-08 21:31:32

如果这是来自您的 DNS GUI 的精确引用,那么您似乎缺少 beta 条目中的尾随 .。它应该是:

beta IN CNAME myelbnamehere.eu-west-1.elb.amazonaws.com.

如果没有 .,它将被解析为:

beta IN CNAME myelbnamehere.eu-west-1.elb.amazonaws.com.domain.com.

这当然不存在。

If that's an exact quote from your DNS GUI, then you appear to be missing the trailing . from the entry for beta. It should read:

beta IN CNAME myelbnamehere.eu-west-1.elb.amazonaws.com.

Without the ., it'll get parsed as:

beta IN CNAME myelbnamehere.eu-west-1.elb.amazonaws.com.domain.com.

which of course doesn't exist.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文