diff --git a/data/conf/nginx/site.conf b/data/conf/nginx/site.conf index ccb94fa0..0f2b8acf 100644 --- a/data/conf/nginx/site.conf +++ b/data/conf/nginx/site.conf @@ -210,4 +210,9 @@ server { } include /etc/nginx/conf.d/site.*.custom; + + error_page 502 @awaitingupstream; + location @awaitingupstream { + rewrite ^(.*)$ /_status.502.html break; + } } diff --git a/data/web/_status.502.html b/data/web/_status.502.html new file mode 100644 index 00000000..3ec5b7da --- /dev/null +++ b/data/web/_status.502.html @@ -0,0 +1,17 @@ + + +
+Oops, 502 - we are probably preparing mailcow.
+Please do not stop the stack, while we are preparing the database or do other preparations.
+What is happening? - Nginx cannot connect to an upstream server.
+ This is fine, if mailcow was just
+ installed or updated and can take a few minutes.
+ Please check the logs or contact support, if the error persists.