https://www.chiliproject.org/2013-01-11T09:29:18+01:00ChiliProjectChiliProject - Feature #1202: Maintenance Modehttps://www.chiliproject.org/issues/1202?journal_id=239002013-01-11T09:29:18+01:00Denny Schierzdenny@rbg.informatik.tu-darmstadt.de
<ul><li><strong>Status</strong> set to <i>Open</i></li><li><strong>Description</strong> set to <i>hi,
every time I have to upgrade/update Chiliproject, I block the 80/443 por...</i> <a href="/journals/23900/diff/description" class="lightbox-ajax">More</a></li><li><strong>Project</strong> set to <i>ChiliProject</i></li><li><strong>Subject</strong> set to <i>Maintenance Mode</i></li><li><strong>Tracker</strong> set to <i>Feature</i></li><li><strong>Priority</strong> set to <i>Normal</i></li><li><strong>Start date</strong> set to <i>2013-01-11</i></li></ul> ChiliProject - Feature #1202: Maintenance Modehttps://www.chiliproject.org/issues/1202?journal_id=239012013-01-11T10:08:09+01:00Felix Schäferfelix+chili@oh14.de
<ul></ul><p>This in my opinion is a concern of the webserver and not of the application.</p>
<p>I personally have something like this in my apache config, which shows users a (static) 503 page when the file <code>tmp/stop.txt</code> exists in ChiliProject:</p>
<pre>ErrorDocument 503 /503.html
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}/../tmp/stop.txt -f
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /$1 [R=503,L]</pre>
<p>The rewrite rules could probably be adapted to allow normal access from a specific IP/IP range, but I've never had the use for it.</p> ChiliProject - Feature #1202: Maintenance Modehttps://www.chiliproject.org/issues/1202?journal_id=239082013-01-13T17:14:42+01:00Luke Carrierluke@carrier.im
<ul></ul><p>For reference, here's a very similar setup for nginx with the added ability to limit access by IP. This is handy for upgrading, installing plugins and the like:</p>
<pre>
server {
# snip
location / {
# Maintenance mode; uncomment this and add your IP
#allow x.x.x.x;
#deny all;
# snip
}
# If the upstream is down or we're in the deny list, show a friendly message
error_page 403 502 503 /error/offline.html;
error_page 504 /error/timeout.html;
location /error {
root /home/chiliproject;
allow all;
}
}
</pre>