From ead000339735211f224c307b2a3bbff8ac0b2e6a Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Mon, 19 Feb 2024 13:19:31 -0800 Subject: [PATCH] Add custom 502 error page, for when the app goes down but nginx is up --- deploy/files/sites-available/impress.conf | 7 ++- public/outage.html | 63 +++++++++++++++++++++++ 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 public/outage.html diff --git a/deploy/files/sites-available/impress.conf b/deploy/files/sites-available/impress.conf index 4234b2ad..91cbcb0c 100644 --- a/deploy/files/sites-available/impress.conf +++ b/deploy/files/sites-available/impress.conf @@ -33,9 +33,14 @@ server { add_header ETag ""; } - # On status 503, return the maintenance page. + # On status 503, return the maintenance page. (We'll trigger this ourselves + # in the @app location, if $maintenance is on.) error_page 503 /maintenance.html; + # On status 502, return the outage page. (nginx will trigger this if the + # `proxy_pass` to the application fails.) + error_page 502 /outage.html; + # Try serving static files first. If not found, fall back to the app. try_files $uri/index.html $uri @app; diff --git a/public/outage.html b/public/outage.html new file mode 100644 index 00000000..2b199dc5 --- /dev/null +++ b/public/outage.html @@ -0,0 +1,63 @@ + + + + + + Dress to Impress: Surprise Downtime? + + + +
+ Distressed Grundo programmer +
+

DTI is down for the count?!

+

+ Hrm, it looks like the DTI application has crashed all the + way into the ground?? 😬 +

+

+ This can happen when our system gets overloaded, or when the + team is working on something and we hit the wrong button 😓 +

+

+ We'll be notified of this outage, and we'll do our best to + be back up soon! 💖 +

+
+
+ +