我买了一个域名,我想把它应用在我的Amazon Ec2实例上? [英] I bought a domain and I want to apply it on my Amazon Ec2 instance?

查看:132
本文介绍了我买了一个域名,我想把它应用在我的Amazon Ec2实例上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个具有公共DNS的Amazon EC2实例:ec2-123 ...... amazon.com



如何从ec2- 123 ... amazon.com to mydomain.com?

解决方案

将域名与电脑相关联是共同的3个组件:


  1. 注册商(这是您购买域名的地方)。

  2. DNS服务器。此服务器回复DNS请求,并将DNS名称解析为IP地址。

  3. 服务器的IP。

这3个组件通常不是来自同一供应商(尽管在许多情况下它们都是这样)。您将从一个注册商处购买域名,您的DNS由其他人托管,服务器由另一个实体托管。



让我们向后退出,从# 3:



IP地址:您需要确保服务器的IP地址是静态的。这意味着服务器的关机之间的IP地址(4位数)不会改变。在Amazon EC2中,这称为弹性IP ,它非常便宜(相对于EC2实例),或者如果您的服务器始终处于起始状态,则它是免费的。 / p>

DNS :您需要有一个具有DNS服务的帐户。亚马逊具有称为路由53的DNS服务。我推荐的其他厂商是nearfreespeach.net或dyndns.com。在DNS服务中,您可以定义DNS记录(通常为A记录或C记录,但还有更多)。如果您购买的域名是domain.com,您需要为domain.com和www.domain.com命名A记录。
您的DNS服务将为您提供名称服务器或其IP地址的名称。通常,有多个服务器相互备份。



注册服务器:这是您的域名和DNS之间的连接你有一个帐户的服务器。输入您从'2'获取的服务器的名称。


请参阅DOC:
http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/CreatingNewDNS.html



I have an Amazon EC2 instance with public DNS: ec2-123......amazon.com

How do I change the public domain from ec2-123......amazon.com to mydomain.com?

解决方案

When associating a domain name with a computer, there are 3 components that work together:

  1. The registrar (This is where you bought the domain name).
  2. The DNS server. This server replies to DNS requests, and resolve DNS names to IP address.
  3. The IP of the server.

These 3 components very often don't come from the same vendor (although, in many cases they do). You would buy a domain name from one registrar, your DNS is hosted by someone else, and the server is hosted by another entity.

Let's go backward, and start with #3:

IP address: You need to make sure that the IP address of your server is static. This means that the IP address (4 digits) don't change between shutdown of the server. In Amazon EC2, this is called Elastic IP, and it is very cheap (relative to EC2 instances), or it is free if your server is up all the time.

DNS: You need to have an account with a DNS service. Amazon has a DNS service called route 53. Other vendors I recommend are nearlyfreespeach.net, or dyndns.com. In a DNS service, you define DNS records (typically A records or C records, but there is more). If the domain name you bought is domain.com, you want to have A records for the names: 'domain.com' and 'www.domain.com'. Your DNS service will give you the names of the name servers, or their IP address. Typically there are more than one servers which backup each other.

Registrar: This is where you make the connection between your domain name and the DNS server you have an account with. Enter there the name of the server you got from '2'.

See the DOCs: http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/CreatingNewDNS.html

这篇关于我买了一个域名,我想把它应用在我的Amazon Ec2实例上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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