Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
The community reviewed whether to reopen this question 2 years ago and left it closed:
Original close reason(s) were not resolved
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(6)
AWS = Amazon Web Services = 一套不同的 Web 服务。
S3(您链接到的)是一个对象存储。您无法在 S3 上托管 Web 服务。
EC2 也属于 AWS 旗下,是虚拟化计算空间。您可以在 EC2 上托管 Web 服务。这就像在某个地方的机架中放置一台服务器一样,只不过当您关闭一个实例时,它就永远消失了。但使用 EBS(就像虚拟化硬盘一样)可以防止您在 EC2 实例关闭时丢失数据。
请参阅 http://aws.amazon.com/ec2/ 和 http://aws.amazon.com/ebs/
AWS = Amazon Web Services = a suite of different web services.
S3 (which you linked to) is an object store. You can't host a web service on S3.
EC2, also under the AWS umbrella, is virtualized compute space. You CAN host a web service on EC2. It is just like having a server in a rack somewhere, except that when you shut down an instance, it is gone forever. But using EBS, which is like a virtualized hard drive, will prevent you from losing your data when the EC2 instance shuts down.
See http://aws.amazon.com/ec2/ and http://aws.amazon.com/ebs/
编辑:2016 年 8 月 12 日,他们有专门的部分介绍如何开始在 AWS 上托管网站。请注意,S3 仅允许静态网站,但 AWS 提供了 SDK,以防您想在实例上运行 PHP、ASP.NET 等。请参阅链接了解更多详细信息。
http://docs.aws.amazon.com/AmazonS3/latest/dev /WebsiteHosting.html
https://aws.amazon.com/websites/
所以猜猜我在 Google 时发现了什么搜索 AWS 上的托管?! AWS 的一篇博客文章指出您(现在)可以在 S3 上托管网站。 (有趣的是,StackOverflow 和 AWS 帖子在 SERP 中紧挨着!)
http://aws.typepad.com/aws/2011/02/host-your-static-website-on-amazon-s3.html
EDIT: Aug 12, 2016 they have a dedicated section on how to get started hosting a website on AWS. Please note S3 only allows STATIC websites but AWS provides SDKs in case you want to run PHP, ASP.NET, etc on your instance. See the links for more details.
http://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html
https://aws.amazon.com/websites/
So guess what I just found while doing some Google searches for hosting on AWS?! A blog post by the AWS stating that you can (now) host a website on S3. (Funny enough, the StackOverflow and the AWS post were right next to each other in the SERPs!)
http://aws.typepad.com/aws/2011/02/host-your-static-website-on-amazon-s3.html
是的,完全可以通过两种方式在 AWS 上托管网站:
1.) 简单 - S3(简单存储解决方案)是一种存储桶存储解决方案,可让您提供静态内容(例如图像),但最近已升级,因此您可以使用它来托管扁平 .html 文件,您的站点将由默认的 Apache 安装提供服务,您只需进行很少的配置(但也很少进行控制)。
2.) 更棘手 - 您可以使用 EC2(弹性计算云)并创建一个虚拟 Linux 实例,然后在其上安装 Apache/NGinx(或其他),以便您完全控制提供任何您想要的服务。您可以使用安全组来启用/禁用单个计算机或一组计算机的端口。
@danben 您的 EC2 实例默认没有固定的公共 IP。亚马逊要求您使用 CNAME - 而不是 A 记录,因为您的 IP 可能会在负载下发生变化。您必须支付 ElasticIP 才能为您的设置获得一致的公共 IP(或使用某种 DynDNS)
Yes it is completely possible to host websites on AWS in 2 ways:
1.) Easy - S3 (Simple Storage Solution) is a bucket storage solution that lets you serve static content e.g. images but has recently been upgraded so you can use it to host flat .html files and your site will get served by a default Apache installation with very little configuration on your part (but also little control).
2.) Trickier - You can use EC2 (Elastic Compute Cloud) and create a virtual Linux instance then install Apache/NGinx (or whatever) on that to give you complete control over serving whatever/however you want. You use SecurityGroups to enable/disable ports for individual machines or groups of them.
@danben your EC2 instance does not have a constant public IP by default. Amazon makes you use a CNAME - not an A record as your IP may change under load. You have to pay for an ElasticIP to get a consistent public IP for your setup (or use some sort of DynDNS)
正如 @danben 提到的,S3 和 EC2 之间存在差异。
对于希望在亚马逊上托管网站的人来说,特别是如果他们想从小规模做起,可能会感兴趣的一件事是亚马逊开始提供 免费套餐 几个月前。加上 BitNami Cloud Hosting 等服务(免责声明,我帮助设计了它,所以它有点像我的宝贝: )意味着您只需几分钟即可在亚马逊云上获得您的网站,而且基本上只需 0 美元。您仍然需要向亚马逊提供信用卡信息,但如果您保持在免费套餐的限额内,则不会被收取费用。
还需要考虑的一件事是,在撰写本文时(2011 年 7 月),亚马逊限制每台服务器只能使用一个 IP 地址。如果您需要托管多个域,您可能需要使用基于名称的虚拟主机或使用其弹性负载均衡器的一些技巧(这将花费您更多)。但总而言之,如果您有一点技术知识并且想要比共享托管为您提供的更多控制权,那么值得一试
As @danben mentioned, there is a difference between S3 and EC2.
One thing that may be interesting for people looking to host a website on Amazon, specially if they want to start small is that Amazon started offering a free tier some months ago. Together with services like BitNami Cloud Hosting (disclaimer, I helped design it, so it is a bit like my baby :) means you can get your site on the Amazon cloud in just minutes, for basically 0 dollars. You still need to give credit card info to Amazon, but it will not be charged if you stay within the limits of their free tier.
One thing to consider too is that at the time of writing this (Jul 2011), Amazon restricts you to one IP address per server. If you need to host multiple domains, you may need to use name-based virtual hosts or some tricks using their Elastic Load Balancer (which will cost you more). But all in all, it is worth a try if you are a bit technical and want more control than what shared hosting provides you
在 reinvent 2018 年,AWS 推出了 Amplify Console,这是一项针对具有无服务器后端的单页面和静态应用程序的持续部署和托管服务。查看:http://console.amplify.aws
At reinvent 2018, AWS launched the Amplify Console, a continuous deployment and hosting service for single page and static apps with serverless backends. Check it out: http://console.amplify.aws
是的!您可以轻松在 AWS 上托管您的网站。
有两种方法;
Yes! You can easily host your website on AWS.
There are two ways;