Commit 1f92e89e authored by Florian Heder's avatar Florian Heder

Redirect all 503 Errors to error503.html Page

parent d970a591
Pipeline #26 failed with stages
......@@ -13,6 +13,7 @@ services:
- vhost:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- certs:/etc/nginx/certs
- ./html:/etc/nginx/html
labels:
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true"
......
<html>
<head>
<title> Kein Eintrag </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<h1>Willkommen</h1>
<p>Unter dieser Domain ist uns kein Eintrag bekannt!</p>
<p>Bitte wenden Sie sich an den <a href="https://www.hebotek.at/kontakt/">Serveradministrator</a>.</p>
<hr />
<p></p>
<h1>Welcome</h1>
<p>We couldn't find any entry for the given domain.</p>
<p>Please contact the <a href="https://www.hebotek.com/contact/">server administrator</a>.</p>
</body>
</html>
# docker cp nginx-redirects.conf nginx-proxy:/etc/nginx/conf.d/
# server {
# server_name from-domain.localhost;
# listen 80;
# access_log /var/log/nginx/access.log vhost;
# return 307 http://to-domain.localhost;
# }
......@@ -96,7 +96,8 @@ server {
listen [::]:80;
{{ end }}
access_log /var/log/nginx/access.log vhost;
return 503;
rewrite ^(.*)$ /error503.html break;
}
{{ if (and (exists "/etc/nginx/certs/default.crt") (exists "/etc/nginx/certs/default.key")) }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment