登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

阿水

 
 
 

日志

 
 

EC2绑定静态IP 从而绑定域名  

2013-01-29 20:45:29|  分类: 默认分类 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

How to Point a Domain to an Amazon EC2 Virtual Server

DECEMBER 8, 2010 BY JAY ANDREW ALLEN 5 COMMENTS

Previously, in our continuing discussion of Amazon Elastic Cloud Computing (EC2), I showed how to set up a simple EC2 virtual server, and how to host basic content (HTML pages) using Apache. This week, I’ll examine how to configure a domain name to point to your server. Fortunately, compared to everything we’ve done so far, this is a relatively simple task. I’ll finish with a quick discussion of Route 53, Amazon’s new domain name server.

Elastic IPs

When the EC2 service first premiered, each EC2 server was assigned a dynamic IP. If a server had to be restarted, it was given a new dynamic IP. Obviously, this makes mapping a domain name to a server problematic, as the DNS association between the domain name and the server IP would be invalidated with every server restart.

To overcome this problem while still retaining the reliability and scalability of cloud computing, Amazon introduced the notion of Elastic IPs. An Elastic IP is a static IP address that belongs to your Amazon EC2 account, as opposed to a specific server. You can associate an IP address to a virtual server; if you need to take that server down for any reason, you can associate the IP with one of your other virtual servers.

Amazon doesn’t charge money for requesting Elastic IPs, but does charge a nominal fee for any unmapped Elastic IPs. To receive a new Elastic IP, simply go to Elastic IPs on the EC2 screen, and click Allocate New Address.

You can then select the newly assigned IP and click Associate to assign it to your EC2 instance. The Elastic IP should be mapped to your virtual server within minutes.

Mapping an Elastic IP to a Domain Name

Once you’ve allocated an Elastic IP to your EC2 server, mapping it to a domain is simple: just modify your domain’s A record with your domain name registrar to point to the Elastic IP. If you have your domain registered with GoDaddy, for example, you can go to the GoDaddy DNS Manager, select Edit Zone for your domain, and put the Elastic IP in the box provided for the A record.

As with most DNS changes, you may need to wait up until 24 hours for old DNS records to expire before the domain name successfully maps to your EC2 server.

Using Route 53 for Dynamic DNS Configuration

As I was researching this article, Amazon announced its new Route 53 domain name service, which allows both configuration and lookup of DNS records using a REST-based API.

I was hoping at the time that Amazon announced it that there would be great UI support for Route 53. It should be possible, for example, to go to the EC2 Dashboard, map the domain to an Elastic IP address, and receive from Amazon a list of nameservers to provide to your domain registrat. Unfortunately, such Dashbaord support is currently lacking. Early adapters must use the REST API, which involves:

  • Generate a CreateHostedZoneRequest XML file;
  • Create an access key to validate your EC2 account with the API;
  • Submit the DNS request to Route 53 using a Perl script (dnscurl.pl); and
  • Configure your domain registrar to use the domain name servers returned by Route 53 in the previous step.

Hopefully, in the future, Amazon will provide excellent Dashboard support for Route 53. Until then, unless you need to develop a set of tools to manage a complex network of EC2 virtual servers, changing your registrar’s A record will likely be all you need.

Related Research:

Arbor Networks Enables DDoS Protection for Cloud Service and Hosting Providers
This Frost & Sullivan whitepaper provides an overview of the latest DDoS attack trends, and offers examples of how cloud service and hosting providers can use Arbor Networks solutions to protect their data centers from DDoS attacks and increase re...

Related Articles:

Visit us for more Programming and Technology Research.

  评论这张
 
阅读(2391)| 评论(0)

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018