mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Add 502 custom error page (#1530)
This commit is contained in:
parent
c50f3771da
commit
5063e12835
4 changed files with 31 additions and 0 deletions
|
@ -30,6 +30,8 @@ server {
|
|||
include /etc/nginx/conf.d/{{ domain }}.d/*.conf;
|
||||
{% endif %}
|
||||
|
||||
include /etc/nginx/conf.d/yunohost_http_errors.conf.inc;
|
||||
|
||||
access_log /var/log/nginx/{{ domain }}-access.log;
|
||||
error_log /var/log/nginx/{{ domain }}-error.log;
|
||||
}
|
||||
|
@ -67,6 +69,7 @@ server {
|
|||
include /etc/nginx/conf.d/yunohost_sso.conf.inc;
|
||||
include /etc/nginx/conf.d/yunohost_admin.conf.inc;
|
||||
include /etc/nginx/conf.d/yunohost_api.conf.inc;
|
||||
include /etc/nginx/conf.d/yunohost_http_errors.conf.inc;
|
||||
|
||||
access_log /var/log/nginx/{{ domain }}-access.log;
|
||||
error_log /var/log/nginx/{{ domain }}-error.log;
|
||||
|
|
7
conf/nginx/yunohost_http_errors.conf.inc
Normal file
7
conf/nginx/yunohost_http_errors.conf.inc
Normal file
|
@ -0,0 +1,7 @@
|
|||
error_page 502 /502.html;
|
||||
|
||||
location = /502.html {
|
||||
|
||||
root /usr/share/yunohost/html/;
|
||||
|
||||
}
|
20
share/html/502.html
Normal file
20
share/html/502.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>502 Bad Gateway</title>
|
||||
<style>
|
||||
body {
|
||||
width: 35em;
|
||||
margin: 0 auto;
|
||||
font-family: Tahoma, Verdana, Arial, sans-serif;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>502 Bad Gateway</h1>
|
||||
<p>If you see this page, your connection with the server is working but the internal service providing this path is not responding.</p>
|
||||
<p>Administrator, make sure that the service is running, and check its logs if it is not.
|
||||
The Services page is in your webadmin, under <code>Tools > Services</code>.</p>
|
||||
<p><em>Thank you for using YunoHost.</em></p>
|
||||
</body>
|
||||
</html>
|
|
@ -1488,6 +1488,7 @@ def app_ssowatconf():
|
|||
"uris": [domain + "/yunohost/admin" for domain in domains]
|
||||
+ [domain + "/yunohost/api" for domain in domains]
|
||||
+ [
|
||||
"re:^[^/]/502%.html$",
|
||||
"re:^[^/]*/%.well%-known/ynh%-diagnosis/.*$",
|
||||
"re:^[^/]*/%.well%-known/acme%-challenge/.*$",
|
||||
"re:^[^/]*/%.well%-known/autoconfig/mail/config%-v1%.1%.xml.*$",
|
||||
|
|
Loading…
Add table
Reference in a new issue