有没有办法让index.html的functionallity与内容托管在S3? [英] Is there a way to have index.html functionallity with content hosted on S3?
问题描述
有没有一种方法,使S3默认为一个index.html页?例如:我斗的对象列表:
Is there a way to make S3 default to an index.html page? E.g.: My bucket object listing:
/index.html
/favicon.ico
/images/logo.gif
一个调用的 www.mysite.com/的的index.html 的的伟大工程!但是,如果一个人叫 www.mysite.com / 我们希望要么得到一个403或REST对象列表XML文档取决于水桶级ACL是如何配置的。
A call to www.mysite.com/index.html works great! But if one were to call www.mysite.com/ we'd either get a 403 or a REST object listing XML document depending on how bucket-level ACL was configured.
因此,问题:是否有办法有index.html的functionallity与托管在S3含量
So, the question: Is there a way to have index.html functionallity with content hosted on S3?
我有点想不存在:(
推荐答案
亚马逊S3现在支持的索引文件
Amazon S3 now supports Index Documents
在索引文件的一个桶可以设置类似 index.html的
。当访问的网站或包含该文件,则返回该名称的文件子的根目录。
The index document for a bucket can be set to something like index.html
. When accessing the root of the site or a sub-directory containing a document of that name that document is returned.
这是非常容易使用做AWS CLI:
It is extremely easy to do using the aws cli:
aws s3 website $MY_BUCKET_NAME --index-document index.html
您可以设置的索引文件的从AWS管理控制台:
You can set the index document from the AWS Management Console:
这篇关于有没有办法让index.html的functionallity与内容托管在S3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!