Serving static websites with Amazon S3+CloudFront, GoDaddy, Nginx, and a VPS
S3 is good for serving static files in situations where you may need
to deal with unexpected spikes in traffic. You can use any S3
uploader such as S3Fox or S3 Organizer to create a bucket for your
files and then upload them. This requires no programming.
bucket. Then, the bucket can be used as a simple content delivery
network. I pointed http://cdn.fuzzyrainbow.com to my CloudFront
bucket by editing my GoDaddy control panel cname settings for
fuzzyrainbow.com. You'd be able to use the S3/CloudFront bucket as-is as a static web
server if it weren't for Amazon's inability to serve default index
pages. I fiddled with S3, CloudFront, and GoDaddy for a bit, but I
couldn't get http://www.fuzzyrainbow.com to automatically serve
index.html. My quick solution to this was to install Nginx on my VPS to serve the
default index page and the .js files. I put those files into a
directory on my VPS and edited my nginx.conf to serve those files.
The images and stylesheets linked from index.html are retrieved from
http://cdn.fuzzyrainbow.com, my fancy little CDN. I've put up the files for http://www.fuzzyrainbow.com here:
http://github.com/audrey/fuzzyrainbowcom
Posted by Audrey M Roy