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

查看:178
本文介绍了将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堆栈.我正在实例上运行Web应用.
  2. 将弹性IP与实例相关联,我可以使用该IP地址访问我的Web应用.
  3. 通过Route53注册的域名
  4. 创建一个与注册域名称相同的托管区域
  5. 使用以下信息创建记录集:
    • 名称:example.com(当然不是字面意思,我在这里有我的域名)
    • 类型:A-IPv4地址
    • 别名:否
    • TTL(秒):300
    • 值:EC2实例的弹性IP
    • 路由策略:简单
  1. Launched EC2 instance and installed LAMP stack. I'm running a web app on the instance.
  2. Associated an Elastic IP to the instance and I'm able to reach my web app using this IP address.
  3. Registered domain name with Route53
  4. Created a Hosted Zone with the same name of registered domain
  5. Created a Record Set with the following info:
    • Name: example.com (of course not literally, I have my domain name here)
    • Type: A - IPv4 address
    • Alias: No
    • TTL(Seconds): 300
    • Value: Elastic IP of EC2 instance
    • Routing Policy: Simple

这就是我被困住的地方.当我在终端中运行nslookup example.com DNS server name时,会得到所需的响应.按预期运行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完成的.创建新的托管区域时,它将自动为您分配名称服务器.要将两者链接在一起,您需要在注册域"区域下输入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天全站免登陆