如何将域重定向到 Amazon EC2 机器? [英] How redirect a domain to Amazon EC2 Machine?

查看:59
本文介绍了如何将域重定向到 Amazon EC2 机器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Amazon 的 EC2 来托管一个用 JSP 构建的网站:

I'm using EC2 of Amazon to host a website built in JSP :

http://ec2-50-17-144-64.compute-1.amazonaws.com:8080/p2p

我买了这个域名:www.p2pbrasil.com

And I bought this domain: www.p2pbrasil.com

如何将 www.p2pbrasil.com 重定向到我在 Amazon EC2 中的网站?

How can I redirect www.p2pbrasil.com to my website in Amazon EC2 ?

当有人输入 www.p2pbrasil.com 时,它会重定向到 http://ec2-50-17-144-64.compute-1.amazonaws.com:8080/p2p ?

When someone type www.p2pbrasil.com it redirects to http://ec2-50-17-144-64.compute-1.amazonaws.com:8080/p2p ?

推荐答案

你需要做两件事

  1. 在 Amazon Web Service 管理面板中,在与您的实例相同的区域中创建一个弹性 IP,并将该 IP 与您的该实例相关联(IP 与实例相关联时不产生任何费用,但如果没有则产生费用).
  2. 将 A 记录添加到您域的 DNS 记录,将域映射到 (1) 中分配的弹性 IP 地址.您的域提供的应该要么为您提供某种设置 A 记录(IP 地址)的方法,要么为您提供一种编辑域的名称服务器的方法.

如果他们不允许您直接设置 A 记录,请找到像 ZoneEdit 这样的 DNS 管理服务,在那里将您的域注册为区域,ZoneEdit 将为您提供名称服务器以输入您的域提供商的管理面板.然后,您可以在 ZoneEdit 中为域添加 A 记录.

If they do not allow you to set the A record directly, find a DNS management service like ZoneEdit, register your domain as a zone there and ZoneEdit will give you the nameservers to enter in the admin panel of your domain provider. You can then add the A record for the domain in ZoneEdit.

我只提到 ZoneEdit 是因为基本服务是免费的,如果您愿意,您也可以使用 Amazon route 53 或类似的付费服务.

I only mention ZoneEdit because the basic service is free, you could also use Amazon route 53 or a similar pay-for service, if you preferred.

这篇关于如何将域重定向到 Amazon EC2 机器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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