I am currently using Amazon Route 53 for my DNS setup and a custom origin (web server outside of Amazon). I'd like to add CloudFront to the mix but I'm not too sure how to set it up?
I've seen Amazon's guide on setting up S3 with Route 53 and CloudFront, but I can't seem to locate any information on doing all this with a custom origin.
Should I be setting it up to work as follows?
I originally planned to host my content on S3 but decided against it because I'd like more control over the hosting (for example, having the ability to use an .htaccess file and ban hacker IPs, etc).
Thanks.
OK so this is how I managed to solve it in the end:
Origin Server:
origin.domain.com
origin.domain.com
shares the same document root as domain.com
domain.com
to www.domain.com
:Amazon CloudFront:
The "Alternate Domain Names (CNAMEs)" is set to www.domain.com
The origin is set to origin.domain.com
Amazon Route 53
The A record for domain.com
is set to my origin server's IP address
The A record for www.domain.com
is set to an alias for the CloudFront distribution
origin.domain.com
is a CNAME for domain.com
Thanks to Matt Houser and Bruce P for their help, by the way. :)