Serving static websites from S3 through Rails
I am trying to create a rails app that will run on my main domain, which will have a bunch of subdomains that will all be separate static websites.
I want the files for these开发者_JAVA百科 static sites to each be in their own folder on an S3 bucket I created. So, going to mysite.example.com you would see the index.html file in the mysite folder on S3. The user's browser would also have to be able to pull any of the CSS and images referenced in index.html
Is there any way to do this? If possible I would like to do this off of Heroku, but that might not be feasible.
The right_aws gem might be exactly what you're looking for; it claims to offer S3 and EC2 support, among other services.
精彩评论