目录列表中的S3的静态网站 [英] Directory Listing in S3 Static Website

查看:235
本文介绍了目录列表中的S3的静态网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经建立了一个S3桶举办静态文件。

I have set up an S3 bucket to host static files.

当使用本网站的端点上(http://.s3-website-us-east-1.amazonaws.com/):它迫使我建立一个索引文件。如果没有找到该文件,它抛出,而不是列出目录内容的错误。

When using the website endpoint (http://.s3-website-us-east-1.amazonaws.com/): it forces me to set an index file. When the file isn't found, it throws an error instead of listing directory contents.

当使用S3端点(.s3.amazonaws.com):我得到的文件的XML清单,但我需要一个HTML列表,用户可以单击链接到文件

When using the s3 endpoint (.s3.amazonaws.com): I get an XML listing of the files, but I need an HTML listing that users can click the link to the file.

我已经尝试设置的所有文件的权限,并在AWS控制台桶本身列表的每个人,但仍没有运气。

I have tried setting the permissions of all files and the bucket itself to "List" for "Everyone" in the AWS Console, but still no luck.

我也尝试了一些JavaScript的替代品,但他们要么没有在网站URL的工作(即重定向到索引文件),或者只是不工作的。作为最后的手段,一个可折叠的JavaScript的上市会比没有好,但我还没有找到一个很好的一个。

I have also tried some of the javascript alternatives, but they either don't work under the website url (that redirects to the index file) or just don't work at all. As a last resort, a collapsible javascript listing would be better than nothing, but I haven't found a good one.

这可能吗?如果是的话,我是否需要更改权限,访问控制列表或其他什么东西?

Is this possible? If so, do I need to change permissions, ACL or something else?

推荐答案

我发现 s3browser ,该让我设置了目录的主要网站,允许浏览的S3桶。它的工作非常好,很容易设置。

I found s3browser, which allowed me to set up a directory on the main web site that allowed browsing of the s3 bucket. It worked very well and was very easy to set up.

这篇关于目录列表中的S3的静态网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆