S3 multiple index files

假装没事ソ 提交于 2020-01-05 17:23:27

问题


I'm using s3 with cloudfront. I have an application that has two index files.

/index /admin/index

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>

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.

Is this expected behavior or something wrong with my configuration of s3 / cloudfront.


回答1:


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

I ended up adding the index.html to the route to make it work.



来源:https://stackoverflow.com/questions/24876252/s3-multiple-index-files

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!