From 0f3ef010273b50961b907d9f9c8640d6aaf16b10 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Fri, 13 Nov 2020 20:00:53 +0000 Subject: [PATCH] Add example maintenance message for Gerrit server Include comments in the Gerrit vhost config template to make setting a temporary site-wide maintenance message easier. Change-Id: I81f69185e081b2a6506d5355bb07a90cb3e03fea --- playbooks/roles/gerrit/templates/gerrit.vhost.j2 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/playbooks/roles/gerrit/templates/gerrit.vhost.j2 b/playbooks/roles/gerrit/templates/gerrit.vhost.j2 index 94e5e615d0..623945b175 100644 --- a/playbooks/roles/gerrit/templates/gerrit.vhost.j2 +++ b/playbooks/roles/gerrit/templates/gerrit.vhost.j2 @@ -55,11 +55,18 @@ ProxyPreserveHost on ProxyStatus On + # Uncomment to show a temporary maintenance message + #ProxyPassMatch ^/maintenance.html$ ! + #Alias /maintenance.html /home/gerrit2/review_site/static/maintenance.html + #RewriteCond %{REQUEST_URI} !^/maintenance.html$ + #RewriteRule ^/(.*) /maintenance.html [last,redirect=temporary] + # TODO remove this when upgrading to Gerrit 2.16. /p/ is used # for project dashboards. ProxyPassMatch ^/p/ ! ProxyPassMatch ^/robots.txt$ ! ProxyPassMatch ^/server-status ! + # Comment out these two lines if the maintenance message above is in use ProxyPass / http://localhost:8081/ nocanon ProxyPassReverse / http://localhost:8081/