My problem is not only about hosting a static website on S3, but to a much lesser extent.
My plan is to have www.foo.com on the S3 website.
So, I create a bucket with the name www.foo.com, and I set the domain there.
Thus, every file that I have on my bucket is publicly accessible and is part of the website.
But there is one exception:
- Whenever I go to
www.foo.com/blog, I want to do an internal redirect to a blog hosted in an EC2 container.
This would be easily achievable with Nginx with a definition proxy_pass. But S3 is not Nginx.
I know that there are some redirect rules that I can apply, but how would I go about doing an internal redirect, where the user has the URL http://www.foo.com/blog , but the blog is hosted on a different machine.
source
share