问题
I have a Cherokee installation that I'm using to serve a few web applications - one blog/calendar/etc. and two CPU-intensive web applications (1 stable version and 1 development version). All of them are Django or Pylons webservices served with CherryPy. I'm using the reverse-proxy handler in Cherokee to handle the mappings.
Occasionally I have to take the development version down to make changes. Is there a way to set up Cherokee so that it will automatically serve (or redirect to) another page (e.g. indicating an under-construction status) when the reverse-proxy target is unfindable or unresponsive?
I'd prefer an automated solution in Cherokee but if someone knows a simple point-and-click method I'll take that too.
回答1:
You could set a custom 504 error page.
来源:https://stackoverflow.com/questions/3449673/can-cherokee-serve-a-fallback-default-page-when-a-reverse-proxy-is-unavailable