将 Amazon Route 53 域名链接到 EC2 实例 [英] Linking Amazon Route 53 Domain Name to EC2 instance

查看:46
本文介绍了将 Amazon Route 53 域名链接到 EC2 实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在 Amazon Route53 上注册了一个域名,我正在尝试将它链接到一个 EC2 实例.我无法成功执行此操作.我已经多次阅读文档,我在网上看了很多教程,我已经阅读了很多堆栈溢出的答案.我还是想不通.将不胜感激.

I have registered a domain name with Amazon Route53 and I'm trying to link it to an EC2 instance. I'm unable to do this successfully. I have read documentation many times over, I have looked at many tutorials online, I have read many stack overflow answers. I still haven't been able t figure it out. Help will be greatly appreciated.

到目前为止我所做的:

  1. 启动了 EC2 实例并安装了 LAMP 堆栈.我正在实例上运行一个网络应用.
  2. 将弹性 IP 与实例相关联,我可以使用此 IP 地址访问我的网络应用程序.
  3. 在Route53注册的域名
  4. 创建一个与注册域同名的托管区域
  5. 使用以下信息创建记录集:
    • 名称:example.com(当然不是字面意思,这里有我的域名)
    • 类型:A - IPv4 地址
    • 别名:否
    • TTL(秒):300
    • 值:EC2 实例的弹性 IP
    • 路由策略:简单

这就是我被卡住的地方.当我在终端中运行 nslookup example.com DNS 服务器名称 时,我得到了所需的响应.运行 dig domain name,按预期返回没有答案.我如何最终将托管区域连接到我的域名以让后者指向我的 EC2 实例?

This is the point at which I am stuck. When I run nslookup example.com DNS server name in terminal I get the desired response. Running dig domain name, as expected returns no answers. How do I finally connect the Hosted Zone to my domain name to get the latter pointing to my EC2 instance?

推荐答案

记录解决方案作为答案.听起来除了将托管区域名称服务器连接到域名之外,您所做的一切都是正确的.这是通过 NS Records 完成的.当您创建新的托管区域时,它会自动为您分配名称服务器.要将两者联系在一起,您需要在Registered Domains"区域下输入NS记录.

Documenting the solution as an answer. It sounds like you got everything correct except hooking up the hosted zone Name Servers to the domain name. This is done via NS Records. When you create a new hosted zone, it automatically assigns you Name Servers. To link the two together, you need to enter the NS records under the "Registered Domains" area.

1.首先从您的托管区域获取 NS 记录

2.将这些记录复制到注册域"下的相应域.

注意:NS Record TTL(生存时间)可能高达 72 小时(很少),因此可能需要很长时间才能将更改反映在诸如 之类的查找工具中dig(或浏览器).

Note: NS Record TTL (time to live) can be as high as 72 hours (rarely), so it could take a significant amount of time for the change to be reflected in a lookup tool like dig (or browser).

这篇关于将 Amazon Route 53 域名链接到 EC2 实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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