Serving from cache even when the origin server goes down

Is it possible to configure Nginx to serve from cache even when the
server is not accessible?

I am trying to figure out if I can use a replicated Nginx instance that
cache files rsynced (lsyncd
from the primary instance and serve from the replicated instance (DNS
switch) if the primary goes down.

  • Cherian

You can use multiple values e.g. the below is probably a good start:

proxy_cache_use_stale error timeout invalid_header updating;

Thanks a lot. This is perfect.

  • Cherian

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs