简体   繁体   English

如何在Amazon EC2实例上直播PHP网站?

[英]How to get PHP site live on amazon EC2 instance?

I have already installed ubuntu14, lamp, phpmyadmin on the EC2 instance. 我已经在EC2实例上安装了ubuntu14,lamp,phpmyadmin。 The site is running fine with the public dsn: 该站点在公共dsn上运行良好:

http://ec2-xx-xx-xx-xx.us-west-2.compute.amazonaws.com . http://ec2-xx-xx-xx-xx.us-west-2.compute.amazonaws.com

Now I need to make it live for original domain like 现在,我需要将其用于原始域,例如

http://example.com http://example.com

I did not register example.com through amazon aws, but through the separate domain service provider. 我没有通过Amazon AWS注册example.com ,而是通过单独的域服务提供商注册的。 In Route 53, I added a hosted zone with example.com that created two record sets. 在Route 53中,我使用example.com添加了一个托管区域,该区域创建了两个记录集。 One with NS and one with SOA. 一个使用NS,另一个使用SOA。 I noted NS, name server/Delegation Set provided by amazone route 53 and replaced the existing name server from registrar from where I purchased domain. 我注意到了amazone route 53提供的NS,名称服务器/ amazone route 53集,并替换了我从中购买域名的registrar中的现有名称服务器。

How to i link Route 53 hosted zone with my ec2 apache www 如何将Route 53 hosted zone与我的ec2 apache www链接

What is next step? 下一步是什么? I don't know. 我不知道。

In AWS Route 53. You need to create an A type record in you hosted zone. 在AWS Route 53中。您需要在托管区域中创建A类型记录。 Click on Create Record Set and in the right panel use the following values: 单击创建记录集,然后在右侧面板中使用以下值:

Name: <leave blank>
Type: A - IPv4 address
Value: <your elastic ip>

Then hit Create button. 然后点击创建按钮。

If you want www.example.com create another record filling field Name with www. 如果您想要www.example.com,请使用www创建另一个记录填充字段“名称”。

You have to just point your domain to amazon public IP.For example, login to your domain registrar and edit A record and add your public ip in points to.Thant's it. 您只需将您的域指向亚马逊公共IP,例如,登录到您的域注册商并编辑A记录,然后将公共IP添加到这些点中即可。 :) :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM