I have some virtual hosts which are redirections to Zope server processes:
RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/http/%{HTTP_HOST}:80/theroot/VirtualHostRoot/$1 [L,P]
Of course, if the Zope process is not running, the redirection fails. This can happen during restart of the instance (e.g. for an update), or for development/testing instances which are not supposed to run all the time. I'd like to have a friendly message in this case.
Thus, for the sole purpose of error handling, I defined a DocumentRoot:
DocumentRoot /var/zope-instances/my-instance/htdocs
ErrorDocument 500 /error-500.html
ErrorDocument 503 /error-500.html
Unfortunately it won't work; when trying a page while Zope is down, Apache tells me:
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
Additionally, a 503 Service Temporarily Unavailable error was encountered while trying to use an ErrorDocument to handle the request.
The error documents are world-readable; the directories are world-executable.
What can I do to get the error page running? Is there something special to consider because of mod_rewrite?