3 ms·
I'm using index document paths on S3 + CloudFront right now, it's definitely possible. Unfortunately, I don't remember exactly what I did to make it work. Some
by adyus 10y ago
I'm using index document paths on S3 + CloudFront right now, it's definitely possible. Unfortunately, I don't remember exactly what I did to make it work. Some more Googling might give you the answer.
Edit: the setting is called "Default Root Object" when setting up a CloudFront distribution with an S3 origin.
- jjnoakes 10y agoDoes that setting apply to any subdirectory? The article linked in a comment above states otherwise.
- brandur 10y ago> Does that setting apply to any subdirectory? The article linked in a comment above states otherwise. No, unfortunately it doesn't. One workaround that I use is to upload files without an extension and explicitly set their content type as `text/html` in S3. So a request to `/about` just serves a file in your S3 bucket called `about`. This works with both CloudFront and S3. I wrote about a few more details of the process here: https://brandur.org/fragments/aws-static-hosting-workaround https://brandur.org/fragments/aws-static-hosting-workaround
- jaxondu 10y agoAre you doing HTTPS? According to the article, the problem exists when running over HTTPS.