Add maintenance.html page
This commit is contained in:
parent
e991eda308
commit
974aaa48ff
2 changed files with 67 additions and 0 deletions
|
@ -8,6 +8,8 @@ server {
|
|||
}
|
||||
|
||||
server {
|
||||
set $maintenance 0; # To enable maintenance mode, set this to 1.
|
||||
|
||||
server_name {{ impress_hostname }};
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
|
@ -31,10 +33,19 @@ server {
|
|||
add_header ETag "";
|
||||
}
|
||||
|
||||
# On status 503, return the maintenance page.
|
||||
error_page 503 maintenance.html;
|
||||
|
||||
# Try serving static files first. If not found, fall back to the app.
|
||||
try_files $uri/index.html $uri @app;
|
||||
|
||||
location @app {
|
||||
# If we're hardcoded as being in maintenance mode, return status 503, which
|
||||
# will show the maintenance page as specified above.
|
||||
if ($maintenance = 1) {
|
||||
return 503;
|
||||
}
|
||||
|
||||
proxy_pass http://127.0.0.1:3000;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
|
56
public/maintenance.html
Normal file
56
public/maintenance.html
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue