public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Commit
[Nginx] Custom 502
9b7668d9
data/conf/nginx/site.conf | 5 +++++
data/web/_status.502.html | 17 +++++++++++++++++
2 files changed, 22 insertions(+)
create mode 100644 data/web/_status.502.html
Diff
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 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Missing upstream</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
+ </head>
+ <body style='color:grey;text-align:center;font-family: Verdana, "Lucida Sans Unicode", sans-serif'>
+ <p>Oops, <b>502</b> - we are probably preparing mailcow.</p>
+ <h1 style="color:#999;font-size:48px">502</h1>
+ <p>Please do not stop the stack, while we are preparing the database or do other preparations.</p>
+ <p style="font-size:small"><b>What is happening?</b> - Nginx cannot connect to an upstream server.<br>
+ This is fine, if mailcow was just
+ installed or updated and can take a few minutes.<br>
+ Please check the logs or contact support, if the error persists.</p>
+ </body>
+</html>