Search code examples
mongrel2

Fallback Page In Mongrel2 When Proxy Service Unavailable?


I've got a Mongrel2 server set up with a basic proxying arrangement: /static/ goes to some static resources, and everything else gets proxied to another server on the same machine. How can I set up Mongrel2 such that if the service that I'm proxying to falls over, instead of just 502 Bad Gateway, it serves a static page?

I'm looking for something similar to this question about Cherokee. I'm having trouble finding the parallel stuff in Mongrel2's documentation - if it's there, I'd appreciate a link.


Solution

  • As of mid-October 2012, this is not possible with Mongrel2. There is, however, an open GitHub issue requesting the feature, and so it seems very likely that this feature will be in a future version of Mongrel2, at which point I'll come back and revise appropriately.

    (Wanted to make sure to answer this question to help future searchers.)