S3多个索引文件 [英] S3 multiple index files
问题描述
我正在将s3与cloudfront一起使用.我有一个具有两个索引文件的应用程序.
I'm using s3 with cloudfront. I have an application that has two index files.
/索引 /admin/index
/index /admin/index
/index工作正常,/admin/index需要我放置/admin/index.html而不包含它抛出的index.html
The /index works fine the /admin/index requires me to put /admin/index.html without including index.html it throws
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>D989FEFADF688159</RequestId>
<HostId>
GvoytrXvDOLPu26AiYYaq6Zi4ck42xyZy3mdxlSF8q5AZc4WEphayr5o6WVDxNM7+qutIAfn53k=
</HostId>
</Error>
我检查了正确设置文件的权限.另外,使用完整的/admin/index.html网址时,我可以查看文件.
I checked the permissions on the file they are correctly set. Additionally I can view the file when using the full url /admin/index.html.
这是预期的行为还是我的s3/cloudfront配置出现问题.
Is this expected behavior or something wrong with my configuration of s3 / cloudfront.
推荐答案
我认为问题是云端.看来使用Cloud Front时不能有多个索引文件. http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DefaultRootObject.html
I think cloudfront is the issue. It appears you can't have multiple index files when using cloud front. http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DefaultRootObject.html
我最终将index.html添加到路由中以使其正常工作.
I ended up adding the index.html to the route to make it work.
这篇关于S3多个索引文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!