Skip to content

Commit dd010b4

Browse files
committed
Initial commit
0 parents  commit dd010b4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1816
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.directory
2+

README.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Minimalist Nginx error pages
2+
3+
A set of custom minimalist 4xx and 5xx error pages for Nginx.
4+
5+
## Preview
6+
![404 error page](https://i.imgur.com/UhkO7uP.pngg)
7+
8+
## Installation
9+
10+
1. Navigate into Nginx's default document directory:
11+
```
12+
cd /user/share/nginx/html
13+
```
14+
2. Clone the repository:
15+
```
16+
git clone CLONE-LINK
17+
```
18+
19+
3. Add the custom error pages to the server's default configuration in `/etc/nginx/sites-enabled/default` file:
20+
```
21+
server {
22+
...
23+
include /usr/share/nginx/html/nginx-errors/nginx-errors.conf
24+
}
25+
```
26+
4. Verify the configuration and reload Nginx:
27+
```
28+
sudo nginx -t
29+
sudo service nginx reload
30+
```

errors/400.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<html>
2+
<head>
3+
<title>Bad Request - <!--# echo var="host" default=""--></title>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
6+
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
7+
</head>
8+
<body>
9+
<main>
10+
<h2 class="main_error-code">400</h2>
11+
<h1 class="main_error-title">Bad Request</h1>
12+
<p class="main_error-message">The server cannot process the request due to a client error.</p>
13+
<p class="main_error-message">We are sorry for the inconvenience.</p>
14+
<a class="main_error-link" href="javascript:window.history.back();">Go back</a>
15+
</main>
16+
</body>
17+
</html>

errors/401.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<html>
2+
<head>
3+
<title>Unauthorized - <!--# echo var="host" default=""--></title>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
6+
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
7+
</head>
8+
<body>
9+
<main>
10+
<h2 class="main_error-code">401</h2>
11+
<h1 class="main_error-title">Unauthorized</h1>
12+
<p class="main_error-message">The request has not been applied because it lacks valid authentication credentials for the target resource.</p>
13+
<p class="main_error-message">We are sorry for the inconvenience.</p>
14+
<a class="main_error-link" href="javascript:window.history.back();">Go back</a>
15+
</main>
16+
</body>
17+
</html>

errors/402.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<html>
2+
<head>
3+
<title>Payment Required - <!--# echo var="host" default=""--></title>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
6+
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
7+
</head>
8+
<body>
9+
<main>
10+
<h2 class="main_error-code">402</h2>
11+
<h1 class="main_error-title">Payment Required</h1>
12+
<!-- <p class="main_error-message">Reserved for future use.</p> -->
13+
<p class="main_error-message">We are sorry for the inconvenience.</p>
14+
<a class="main_error-link" href="javascript:window.history.back();">Go back</a>
15+
</main>
16+
</body>
17+
</html>

errors/403.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<html>
2+
<head>
3+
<title>Forbidden - <!--# echo var="host" default=""--></title>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
6+
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
7+
</head>
8+
<body>
9+
<main>
10+
<h2 class="main_error-code">403</h2>
11+
<h1 class="main_error-title">Forbidden</h1>
12+
<p class="main_error-message">The server refused to authorize the request.</p>
13+
<p class="main_error-message">We are sorry for the inconvenience.</p>
14+
<a class="main_error-link" href="javascript:window.history.back();">Go back</a>
15+
</main>
16+
</body>
17+
</html>

errors/404.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<html>
2+
<head>
3+
<title>Not Found - <!--# echo var="host" default=""--></title>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
6+
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
7+
</head>
8+
<body>
9+
<main>
10+
<h2 class="main_error-code">404</h2>
11+
<h1 class="main_error-title">Not Found</h1>
12+
<p class="main_error-message">The requested file or page cannot be found at this address.</p>
13+
<p class="main_error-message">We are sorry for the inconvenience.</p>
14+
<a class="main_error-link" href="javascript:window.history.back();">Go back</a>
15+
</main>
16+
</body>
17+
</html>

errors/405.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<html>
2+
<head>
3+
<title>Method Not Allowed - <!--# echo var="host" default=""--></title>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
6+
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
7+
</head>
8+
<body>
9+
<main>
10+
<h2 class="main_error-code">405</h2>
11+
<h1 class="main_error-title">Method Not Allowed</h1>
12+
<p class="main_error-message">The method received in the request-line is not supported by the target resource.</p>
13+
<p class="main_error-message">We are sorry for the inconvenience.</p>
14+
<a class="main_error-link" href="javascript:window.history.back();">Go back</a>
15+
</main>
16+
</body>
17+
</html>

errors/406.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<html>
2+
<head>
3+
<title>Not Acceptable - <!--# echo var="host" default=""--></title>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
6+
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
7+
</head>
8+
<body>
9+
<main>
10+
<h2 class="main_error-code">406</h2>
11+
<h1 class="main_error-title">Not Acceptable</h1>
12+
<p class="main_error-message">The target resource does not have a current representation that would be acceptable to the user agent.</p>
13+
<p class="main_error-message">We are sorry for the inconvenience.</p>
14+
<a class="main_error-link" href="javascript:window.history.back();">Go back</a>
15+
</main>
16+
</body>
17+
</html>

errors/407.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<html>
2+
<head>
3+
<title>Proxy Authentication Required - <!--# echo var="host" default=""--></title>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
6+
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
7+
</head>
8+
<body>
9+
<main>
10+
<h2 class="main_error-code">407</h2>
11+
<h1 class="main_error-title">Proxy Authentication Required</h1>
12+
<p class="main_error-message">The client needs to authenticate itself in order to use a proxy.</p>
13+
<p class="main_error-message">We are sorry for the inconvenience.</p>
14+
<a class="main_error-link" href="javascript:window.history.back();">Go back</a>
15+
</main>
16+
</body>
17+
</html>

errors/408.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<html>
2+
<head>
3+
<title>Request Timeout - <!--# echo var="host" default=""--></title>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
6+
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
7+
</head>
8+
<body>
9+
<main>
10+
<h2 class="main_error-code">408</h2>
11+
<h1 class="main_error-title">Request Timeout</h1>
12+
<p class="main_error-message">The server did not receive a complete request message within the time that it was prepared to wait.</p>
13+
<p class="main_error-message">We are sorry for the inconvenience.</p>
14+
<a class="main_error-link" href="javascript:window.history.back();">Go back</a>
15+
</main>
16+
</body>
17+
</html>

errors/409.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<html>
2+
<head>
3+
<title>Conflict - <!--# echo var="host" default=""--></title>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
6+
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
7+
</head>
8+
<body>
9+
<main>
10+
<h2 class="main_error-code">409</h2>
11+
<h1 class="main_error-title">Conflict</h1>
12+
<p class="main_error-message">The request could not be completed due to a conflict with the current state of the target resource..</p>
13+
<p class="main_error-message">We are sorry for the inconvenience.</p>
14+
<a class="main_error-link" href="javascript:window.history.back();">Go back</a>
15+
</main>
16+
</body>
17+
</html>

errors/410.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<html>
2+
<head>
3+
<title>Gone - <!--# echo var="host" default=""--></title>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
6+
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
7+
</head>
8+
<body>
9+
<main>
10+
<h2 class="main_error-code">410</h2>
11+
<h1 class="main_error-title">Gone</h1>
12+
<p class="main_error-message">The access to the target resource is no longer available at the origin server.</p>
13+
<p class="main_error-message">We are sorry for the inconvenience.</p>
14+
<a class="main_error-link" href="javascript:window.history.back();">Go back</a>
15+
</main>
16+
</body>
17+
</html>

errors/411.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<html>
2+
<head>
3+
<title>Length Required - <!--# echo var="host" default=""--></title>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
6+
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
7+
</head>
8+
<body>
9+
<main>
10+
<h2 class="main_error-code">411</h2>
11+
<h1 class="main_error-title">Length Required</h1>
12+
<p class="main_error-message">The server refuses to accept the request without a defined Content-Length.</p>
13+
<p class="main_error-message">We are sorry for the inconvenience.</p>
14+
<a class="main_error-link" href="javascript:window.history.back();">Go back</a>
15+
</main>
16+
</body>
17+
</html>

errors/412.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<html>
2+
<head>
3+
<title>Precondition Failed - <!--# echo var="host" default=""--></title>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
6+
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
7+
</head>
8+
<body>
9+
<main>
10+
<h2 class="main_error-code">412</h2>
11+
<h1 class="main_error-title">Precondition Failed</h1>
12+
<p class="main_error-message">One or more conditions given in the request header fields evaluated to false when tested on the server.</p>
13+
<p class="main_error-message">We are sorry for the inconvenience.</p>
14+
<a class="main_error-link" href="javascript:window.history.back();">Go back</a>
15+
</main>
16+
</body>
17+
</html>

errors/413.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<html>
2+
<head>
3+
<title>Payload Too Large - <!--# echo var="host" default=""--></title>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
6+
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
7+
</head>
8+
<body>
9+
<main>
10+
<h2 class="main_error-code">413</h2>
11+
<h1 class="main_error-title">Payload Too Large</h1>
12+
<p class="main_error-message">The server is refusing to process a request because the request payload is larger than the server is willing to process.</p>
13+
<p class="main_error-message">We are sorry for the inconvenience.</p>
14+
<a class="main_error-link" href="javascript:window.history.back();">Go back</a>
15+
</main>
16+
</body>
17+
</html>

errors/414.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<html>
2+
<head>
3+
<title>URI Too Long - <!--# echo var="host" default=""--></title>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
6+
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
7+
</head>
8+
<body>
9+
<main>
10+
<h2 class="main_error-code">414</h2>
11+
<h1 class="main_error-title">URI Too Long</h1>
12+
<p class="main_error-message">The server is refusing to service the request because the request-target is longer than the server is willing to interpret.</p>
13+
<p class="main_error-message">We are sorry for the inconvenience.</p>
14+
<a class="main_error-link" href="javascript:window.history.back();">Go back</a>
15+
</main>
16+
</body>
17+
</html>

errors/415.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<html>
2+
<head>
3+
<title>Unsupported Media Type - <!--# echo var="host" default=""--></title>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
6+
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
7+
</head>
8+
<body>
9+
<main>
10+
<h2 class="main_error-code">415</h2>
11+
<h1 class="main_error-title">Unsupported Media Type</h1>
12+
<p class="main_error-message">The origin server is refusing to service the request because the payload is in a format not supported by this method on the target resource.</p>
13+
<p class="main_error-message">We are sorry for the inconvenience.</p>
14+
<a class="main_error-link" href="javascript:window.history.back();">Go back</a>
15+
</main>
16+
</body>
17+
</html>

errors/416.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<html>
2+
<head>
3+
<title>Range Not Satisfiable - <!--# echo var="host" default=""--></title>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
6+
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
7+
</head>
8+
<body>
9+
<main>
10+
<h2 class="main_error-code">416</h2>
11+
<h1 class="main_error-title">Range Not Satisfiable</h1>
12+
<p class="main_error-message">The set of ranges requested has been rejected due to invalid ranges.</p>
13+
<p class="main_error-message">We are sorry for the inconvenience.</p>
14+
<a class="main_error-link" href="javascript:window.history.back();">Go back</a>
15+
</main>
16+
</body>
17+
</html>

errors/417.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<html>
2+
<head>
3+
<title>Expectation Failed - <!--# echo var="host" default=""--></title>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
6+
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
7+
</head>
8+
<body>
9+
<main>
10+
<h2 class="main_error-code">417</h2>
11+
<h1 class="main_error-title">Expectation Failed</h1>
12+
<p class="main_error-message">The expectation given in the request's expect header field could not be met by the inbound server.</p>
13+
<p class="main_error-message">We are sorry for the inconvenience.</p>
14+
<a class="main_error-link" href="javascript:window.history.back();">Go back</a>
15+
</main>
16+
</body>
17+
</html>

errors/418.html

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<html>
2+
<head>
3+
<title>I'm a teapot - <!--# echo var="host" default=""--></title>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
6+
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
7+
</head>
8+
<body>
9+
<main>
10+
<h2 class="main_error-code">418</h2>
11+
<h1 class="main_error-title">I'm a teapot</h1>
12+
<p class="main_error-message">I cannot brew your coffee because I'm a teapot.</p>
13+
<a class="main_error-link" href="javascript:location.reload();">Try again</a>
14+
</main>
15+
</body>
16+
</html>

0 commit comments

Comments
 (0)