Hacker News new | past | comments | ask | show | jobs | submit login

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.




Does that setting apply to any subdirectory? The article linked in a comment above states otherwise.


> 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


Are you doing HTTPS? According to the article, the problem exists when running over HTTPS.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: