在AWS服务器和自定义域之间配置的最简单方法是什么

时间:2015-09-21 12:59:28

标签: amazon-web-services amazon-ec2

我正试图在我的AWS服务器和域之间摇晃。我从godday.com购买了我的域名。任何人都可以帮助我。

1 个答案:

答案 0 :(得分:3)

首先你需要创建ec2实例的静态ip,这是因为每次重启ec2时ec2 ip都是易失性的,ip会改变。在这种情况下你必须创建一个静态ip,所以按照下面的步骤登录到你的amaazon aws console然后:

1.On EC2 Management console you will have a vertical menu on the left hand side.
2.Under “NETWORK & SECURITY” group click on “Elastic IPs”.
3.On the top menu you will see a blue button “Allocate New Address” click on it.
4.Just be sure “EIP used in” is set to “EC2” then click “Yes, Allocate”.
5.A new IP address will be created on the table, select it by clicking on the empty square by the left of the name.
6.Now click on “Associate Address” on the pop-up click on instance and select the instance you would like to associate to this IP.
7.Finally click “Associate” and that’s it. For now to access via SSH, FTP, etc. you will need to use the new elastic IP.

接下来,您需要将静态IP指向Godaddy域名。登录godaddy帐户:

1.Login into your godaddy account.
2.Under the upper menu click “Domains” and then click “Manage my Domains”.
3.Select the domain you would like to change by clicking the link to the domain on the table under “Domain Name” column.
4.In Domain Details there are three tabs, you should click on “DNS Zone File”.
5.Under A(Host) , click on “Edit Record (pick the one which is "@")” at the end in “Actions” column.
6.Now change the value on the field “Points to” with the elastic ip of your amazon ec2 instance. 

希望对你有所帮助。