nginx and self-healing S3 static hosting

Jean-Philippe skateinmars at
Wed Jul 30 00:42:15 MSD 2008

Ian M. Evans a écrit :
> Jean-Philippe wrote:
>> However this rewrite system does not seem clean. I think it would be 
>> better to simply use dns and subdomains for your static files, and 
>> change the subdomain used when s3 is down.
> I'm not sure I'm totally following this last paragraph.
> Do you mean have two cnames, say, and 
> and change the rewrite depending on the check files existence?
> Sorry...up in the wee hours with a head cold. :-(

If you use URL rewriting, your requests will have to go trough nginx to be 
redirected, which is inefficient.

Just use an assets servers like in an s3 instance. Set up an 
additional nginx vhost and if s3 goes down you'll just have to modify the DNS.

More information about the nginx mailing list