静态网页内容最简单的云是哪一个

发布于 2024-08-17 05:37:36 字数 1014 浏览 1 评论 0原文

我有一些 HTML 页面,其中包含必需的图像、CSS 和其他零碎内容,所有静态内容都不需要 CGI。我目前将其托管在 Amazon EC2 映像上,我需要为不同的应用程序启动并运行该映像。理想情况下,我希望将静态内容的托管移出 EC2 映像,以便它独立于任何单个 EC2 实例。我想将其托管在免费或至少按需付费的云选项之一上。

我遇到的选项是:

  1. Windows Azure,在这种情况下,我无法使 .html 页面正常工作,即使可以,这也意味着我必须更新整个 Windows Azure 应用程序每次我需要更新图像时?或者是否有一种简单的方法可以从 Azure blob 提供静态 Web 内容?

  2. 亚马逊的 S3,我想我必须将完全限定的 URL 放入每个图像、CSS 等文件的每个 HTML 页面中,但这不会太糟糕。这似乎是一个合理的选择。

  3. Google 的 App Engine,只花了 10 分钟查看它,但看起来它也能工作。

  4. Wordpress,我可以将 HTML 合并到 WordPress 博客网站中,但我发现主题有点过于严格,页面只能这么宽等。

有没有更简单的方法?

更新:

经过进一步调查,我发现两种最好的方法是 Sug 和 Windows Azure Blob 存储(而不是 Windows Azure 服务)所描述的 S3 方法。

S3 和 Azure Blob 之间的区别在于 CNAME 的管理方式:

  • 对于 S3,您最终会得到一个 CNAME,如 mybucket.mydomain.com
  • 对于 Azure,您最终会得到一个 CNAME,如 *.mydomain.com,其中 * 代表无论你喜欢什么。要访问 blob,路径为 *.mydomain.com/container/。

因此,S3 规定了 CNAME 主机,但在资源路径上提供了充分的灵活性。 Azure 在 CNAME 主机上提供了充分的灵活性,但规定了资源路径的第一部分。

I've got a few HTML pages with the requisite images, css and other bits and pieces, all static content no CGI required. I currently host it on an Amazon EC2 image that I need to have up and running for a different application. Ideally I'd like to move the hosting of the static content off the EC2 image so that it's independent of any single EC2 instance. I'd like to host it on one of the free or at least pay as you go cloud options.

The options I've come across are:

  1. Windows Azure, in this case I haven't been able to get .html pages working and even if it is possible would it mean I'd have to update the whole Windows Azure app everytime I needed to update an image? Or is there an easy way static web content could be served up from Azure blobs?

  2. Amazon's S3, I think I'd have to put fully qualified URL's into each HTML page for each image, css etc. file but that wouldn't be too bad. This seems like a reasonable option.

  3. Google's App Engine, only spent 10 minutes looking at it but it seems like it would work as well.

  4. Wordpress, I could just incorporate the HTML into a wordpress blog site but I find the themes a little bit too restrictive, pages can only be so wide etc.

Is there an easier way?

Update:

After some further investigation the two best ways I found are the S3 approach as described by Sug and Windows Azure Blob storage (rather than a Windows Azure service).

The difference between S3 and Azure Blobs is how the CNAME can be managed:

  • For S3 you'll end up with a CNAME like mybucket.mydomain.com
  • For Azure you'll end up with a CNAME like *.mydomain.com where * represents whatever you like. To access blobs the path is then *.mydomain.com/container/.

So S3 dictates the CNAME host but gives full flexibility on the resource path. Azure gives full flexibility on the CNAME host but dictates the first part of the resource path.

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

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

发布评论

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

评论(4

还在原地等你 2024-08-24 05:37:36

如果仅提供静态文件,使用 AppEngine 或 Azure 等服务就太过分了。
最简单的解决方案是使用 AWS S3:
1) 无需编码
2) 定价
3) 您可以轻松地将存储桶映射到您自己的域或子域。
4) 免费的客户端工具来管理您的存储桶,因为它是非常简单的文件系统。
我个人使用 S3Fox,但还有很多其他的(BucketExplorer 是另一个例子)

For serving only static files, using services like AppEngine or Azure will be over kill.
The simplest solution will be to use AWS S3:
1) No coding required
2) Pricing
3) You can easily map a bucket to your own domain or subdomain.
4) Free client tools to manage your buckets as it was dead simple filesystem.
I personally use S3Fox but there are many others (BucketExplorer is another example)

青春如此纠结 2024-08-24 05:37:36

“S3 决定 CNAME 主机”

Amazon 有一个名为 CloudFront 的 CDN 服务,该服务使用 S3 存储桶贮存。您只需支付 S3 数据传输费用(我认为)。

您的存储桶内容将复制到亚马逊的 CDN,这意味着可以从世界各地进行超快速访问。但是,由于它是 CDN,因此文件会自动缓存很长时间(因此重命名或删除文件时会出现延迟)。

仅使用 S3 存储桶,并设置另一个域以通过 CNAME 指向该存储桶,可能是最好的主意。

“S3 dictates the CNAME host”

Amazon has a CDN service called CloudFront, that uses an S3 bucket for storage. You only pay for S3 data transfer (I think).

Your bucket contents are copied to Amazon’s CDN, meaning superfast access from around the world. However, because it’s a CDN, files are automatically cached for a long time (so there’s a delay when re-naming or deleting files).

Just using an S3 bucket, and setting up another domain to point to the bucket via a CNAME, might be the best idea.

荒芜了季节 2024-08-24 05:37:36

对于像这样的简单网站,我在 Nearly Free Speech.Net 方面获得了很好的体验。

For simple sites like this, I've had good experiences with Nearly Free Speech.Net.

桃扇骨 2024-08-24 05:37:36

GitHub.com 页面。您只需要了解 Git 基础知识,查看 gh-pages 分支,并将静态内容放在那里。它将位于 http://your-name.github.io/your-project/

例如,这是 我的项目文件

GitHub.com pages. You just need to know Git basics, check out the gh-pages branch, and put the static content there. It will be available at http://your-name.github.io/your-project/

For example, this is my project's file.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文