Apache can't serve ErrorDocument with latest config
Since all requests were made to be forwarded into workhorse Apache 2.2 started failing to serve error documents. Instead of fancy "Deploy in progress" page I see:
Service Temporarily Unavailable
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.
Here is a corresponding snippet from apache config:
RewriteEngine on
#Forward all requests to gitlab-workhorse
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA]
RequestHeader set X_FORWARDED_PROTO 'https'
RequestHeader set X-Forwarded-Ssl on
# needed for downloading attachments
DocumentRoot /home/gitlab/gitlab/public
#Set up apache error documents, if back end goes down (i.e. 503 error) then a maintenance/deploy page is thrown up.
ErrorDocument 404 /404.html
ErrorDocument 422 /422.html
ErrorDocument 500 /500.html
ErrorDocument 503 /deploy.html
I guess it tries to forward ErrorDocument to workhorse which is down during deploy.