Merge pull request #2642 from chiedo/error-pages

Added better default nginx error pages
This commit is contained in:
Jose Diaz-Gonzalez authored and GitHub committed 2017-04-22 20:27:41 -06:00
commit e719da300f
6 files changed
+141

No files matched your search

@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html>
<head>
<title>The page you were looking for cannot be served (4xx)</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<style>
body {
background-color: #6CABF7;
color: #fff;
text-align: center;
font-family: arial, sans-serif;
margin: 0;
}
div {
position:absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
}
p {
color: #eee;
}
</style>
</head>
<body>
<div>
<h2>The page you were looking for cannot be served.</h2>
<p>If you are the application owner check the logs for more information.</p>
</div>
</body>
</html>
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html>
<head>
<title>The page you were looking for doesn't exist (404)</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<style>
body {
background-color: #6CABF7;
color: #fff;
text-align: center;
font-family: arial, sans-serif;
margin: 0;
}
div {
position:absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
}
p {
color: #eee;
}
</style>
</head>
<body>
<div>
<h2>The page you were looking for doesn't exist.</h2>
<p>You may have mistyped the address or the page may have moved.</p>
<p>If you are the application owner check the logs for more information.</p>
</div>
</body>
</html>
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html>
<head>
<title>We're sorry, but something went wrong (500)</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<style>
body {
background-color: #6CABF7;
color: #fff;
text-align: center;
font-family: arial, sans-serif;
margin: 0;
}
div {
position:absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
}
p {
color: #eee;
}
</style>
</head>
<body>
<div>
<h1>We're sorry, but something went wrong.</h1>
<p>If you are the application owner check the logs for more information.</p>
</div>
</body>
</html>
@@ -34,6 +34,24 @@ server {
proxy_set_header X-Request-Start $msec;
}
include {{ $.DOKKU_ROOT }}/{{ $.APP }}/nginx.conf.d/*.conf;
error_page 400 401 402 403 405 406 407 408 409 410 411 412 413 414 415 416 417 418 420 422 423 424 426 428 429 431 444 449 450 451 /400-error.html;
location /400-error.html {
root {{ $.DOKKU_LIB_ROOT }}/data/nginx-vhosts/dokku-errors;
internal;
}
error_page 404 /404-error.html;
location /404-error.html {
root {{ $.DOKKU_LIB_ROOT }}/data/nginx-vhosts/dokku-errors;
internal;
}
error_page 500 501 502 503 504 505 506 507 508 509 510 511 /500-error.html;
location /500-error.html {
root {{ $.DOKKU_LIB_ROOT }}/data/nginx-vhosts/dokku-errors;
internal;
}
{{ end }}
}
{{ else if eq $scheme "https"}}
@@ -73,6 +91,24 @@ server {
proxy_set_header X-Request-Start $msec;
}
include {{ $.DOKKU_ROOT }}/{{ $.APP }}/nginx.conf.d/*.conf;
error_page 400 401 402 403 405 406 407 408 409 410 411 412 413 414 415 416 417 418 420 422 423 424 426 428 429 431 444 449 450 451 /400-error.html;
location /400-error.html {
root {{ $.DOKKU_LIB_ROOT }}/data/nginx-vhosts/dokku-errors;
internal;
}
error_page 404 /404-error.html;
location /404-error.html {
root {{ $.DOKKU_LIB_ROOT }}/data/nginx-vhosts/dokku-errors;
internal;
}
error_page 500 501 502 503 504 505 506 507 508 509 510 511 /500-error.html;
location /500-error.html {
root {{ $.DOKKU_LIB_ROOT }}/data/nginx-vhosts/dokku-errors;
internal;
}
}
{{ end }}{{ end }}