I would like to serve the index.html file for my domain via a cdn (and a few other static pages).
Would it be possible to do this with an Amazon EC2 Instance and Rackspace Cloud Files?
I found something that sort of does this but only for an /images and /files directory:
server {
listen 80;
server_name cdn.failverse.com;
access_log /var/log/nginx/cdn.failverse.access.log;
location / {
root /var/www/vhosts/domain2/public/cdn;
index index.html;
if (!-e $request_filename)
{
rewrite ^/images/(.*)$ http://c0918182.cdn.cloudfiles.rackspacecloud.com/$1 redirect;
rewrite ^/files/(.*)$ http://c0918176.cdn.cloudfiles.rackspacecloud.com/$1 redirect;
}
}
}
http://failverse.com/using-your-own-domain-with-rackspace-cloud-files/
It would be great if I could have the Cloud Files be part of my own subdomains ie. cdn.mydocmain.com (If I have to use Rackspace Servers for everything that is okay too).
Thanks