是否可以使用AWS作为网络主机?

发布于 2024-08-18 21:57:55 字数 1705 浏览 6 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

霊感 2024-08-25 21:57:55

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/

赏烟花じ飞满天 2024-08-25 21:57:55

编辑: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

紅太極 2024-08-25 21:57:55

是的,完全可以通过两种方式在 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)

南风几经秋 2024-08-25 21:57:55

正如 @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

自由如风 2024-08-25 21:57:55

在 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

水水月牙 2024-08-25 21:57:55

是的!您可以轻松在 AWS 上托管您的网站。
有两种方法;

  1. 使用本机 AWS - 这是一种棘手的方法,需要专业知识和一系列命令才能运行。您需要自己管理安全性、DNS、SSL、服务器协议等。
  2. Cloudways 等托管云平台 - 只需单击几下,您就可以轻松启动 AWS 服务器并托管您的网站。此外,您可以通过其直观的平台快速管理您的服务器协议、软件包、安全防火墙、DNS 等。

Yes! You can easily host your website on AWS.
There are two ways;

  1. One with Native AWS - This is a tricky method that requires expertise and a series of commands to run. You need to manage security, DNS, SSL, server protocols, and more by yourself.
  2. Managed Cloud Platforms like Cloudways - You can easily launch an AWS server and host your website with a few clicks. Moreover, you can quickly manage your server protocols, packages, security firewalls, DNS, and more from its intuitive platform.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文