mirror of
https://github.com/joglomedia/LEMPer.git
synced 2026-04-03 11:18:21 +00:00
add custom 400 error page
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
## Directives to handle error page.
|
||||
# Designed to be included in any server{} block.
|
||||
|
||||
error_page 400 /400.html;
|
||||
error_page 401 /401.html;
|
||||
error_page 403 /403.html;
|
||||
error_page 404 /404.html;
|
||||
@@ -10,6 +11,12 @@ error_page 502 /502.html;
|
||||
error_page 503 /503.html;
|
||||
error_page 504 /504.html;
|
||||
|
||||
location = /400.html {
|
||||
root /usr/share/nginx/html/error-pages;
|
||||
internal;
|
||||
#access_log off;
|
||||
}
|
||||
|
||||
location = /401.html {
|
||||
root /usr/share/nginx/html/error-pages;
|
||||
internal;
|
||||
|
||||
43
share/nginx/html/error-pages/400.html
Normal file
43
share/nginx/html/error-pages/400.html
Normal file
@@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!--
|
||||
Served by
|
||||
_ _____ __ __ ____
|
||||
| | | ____| \/ | _ \ ___ _ __
|
||||
| | | _| | |\/| | |_) / _ \ '__|
|
||||
| |___| |___| | | | __/ __/ |
|
||||
|_____|_____|_| |_|_| \___|_|
|
||||
-->
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>400 Bad Request</title>
|
||||
<link href="https://fonts.googleapis.com/css?family=Cabin:400,700" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:900" rel="stylesheet">
|
||||
<style>
|
||||
/**
|
||||
* Forked from Colorlib https://colorlib.com/etc/404/colorlib-error-404-3/
|
||||
*/
|
||||
*{-webkit-box-sizing:border-box;box-sizing:border-box}body{padding:0;margin:0}#errorpg{position:relative;height:100vh}#errorpg .errorpg{position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.errorpg{max-width:520px;width:100%;line-height:1.4;text-align:center}.errorpg .errorpg-msg{position:relative;height:240px}.errorpg .errorpg-msg h1{font-family:Montserrat,sans-serif;position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);font-size:252px;font-weight:900;margin:0;color:#262626;text-transform:uppercase;letter-spacing:-40px;margin-left:-20px}.errorpg .errorpg-msg h1>span{text-shadow:-8px 0 0 #fff}.errorpg .errorpg-msg h3{font-family:Cabin,sans-serif;position:relative;font-size:16px;font-weight:700;text-transform:uppercase;color:#262626;margin:0;letter-spacing:3px;padding-left:6px}.errorpg h2{font-family:Cabin,sans-serif;font-size:20px;font-weight:400;text-transform:uppercase;color:#000;margin-top:0;margin-bottom:25px}@media only screen and (max-width:767px){.errorpg .errorpg-msg{height:200px}.errorpg .errorpg-msg h1{font-size:200px}}@media only screen and (max-width:480px){.errorpg .errorpg-msg{height:162px}.errorpg .errorpg-msg h1{font-size:162px;height:150px;line-height:162px}.errorpg h2{font-size:16px}}</style>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<div id="errorpg">
|
||||
<div class="errorpg">
|
||||
<div class="errorpg-msg">
|
||||
<h3>Oops! Bad Request</h3>
|
||||
<h1><span>4</span><span>0</span><span>0</span></h1>
|
||||
</div>
|
||||
<h2>Sorry, we could not understand your request.</h2>
|
||||
<p>Probably you're typing incorrect protocol, malformed syntax, incorrectly typed URL, or a URL that contains illegal characters.</p>
|
||||
<p>For questions or problems, please contact our support team.</p>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<script src="https://ajax.cloudflare.com/cdn-cgi/scripts/95c75768/cloudflare-static/rocket-loader.min.js" data-cf-settings="d841170f43ff1e03f58512ad-|49" defer=""></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user