From 1813708140cccda4e37fa2525be9bc9b10765004 Mon Sep 17 00:00:00 2001 From: joglomedia Date: Sat, 7 Sep 2019 22:05:23 +0700 Subject: [PATCH] add custom nginx error page --- etc/nginx/includes/error_pages.conf | 28 ++++++++--------- share/nginx/html/error-pages/403.html | 45 +++++++++++++++++++++++++++ share/nginx/html/error-pages/404.html | 45 +++++++++++++++++++++++++++ share/nginx/html/error-pages/500.html | 45 +++++++++++++++++++++++++++ share/nginx/html/error-pages/502.html | 44 ++++++++++++++++++++++++++ share/nginx/html/error-pages/503.html | 44 ++++++++++++++++++++++++++ share/nginx/html/error-pages/504.html | 44 ++++++++++++++++++++++++++ 7 files changed, 281 insertions(+), 14 deletions(-) create mode 100644 share/nginx/html/error-pages/403.html create mode 100644 share/nginx/html/error-pages/404.html create mode 100644 share/nginx/html/error-pages/500.html create mode 100644 share/nginx/html/error-pages/502.html create mode 100644 share/nginx/html/error-pages/503.html create mode 100644 share/nginx/html/error-pages/504.html diff --git a/etc/nginx/includes/error_pages.conf b/etc/nginx/includes/error_pages.conf index e2ec80f..844fa4f 100644 --- a/etc/nginx/includes/error_pages.conf +++ b/etc/nginx/includes/error_pages.conf @@ -9,43 +9,43 @@ error_page 503 /503.html; error_page 504 /504.html; location = /403.html { - root /usr/share/nginx/html/error_pages; - #access_log off; + root /usr/share/nginx/html/error-pages; internal; + #access_log off; } location = /404.html { - root /usr/share/nginx/html/error_pages; - #access_log off; + root /usr/share/nginx/html/error-pages; internal; + #access_log off; } location = /500.html { - root /usr/share/nginx/html/error_pages; - #access_log off; + root /usr/share/nginx/html/error-pages; internal; + #access_log off; } location = /502.html { - root /usr/share/nginx/html/error_pages; - #access_log off; + root /usr/share/nginx/html/error-pages; internal; + #access_log off; } location = /503.html { - root /usr/share/nginx/html/error_pages; - #access_log off; + root /usr/share/nginx/html/error-pages; internal; + #access_log off; } location = /504.html { - root /usr/share/nginx/html/error_pages; - #access_log off; + root /usr/share/nginx/html/error-pages; internal; + #access_log off; } location = /50x.html { - root /usr/share/nginx/html/error_pages; - #access_log off; + root /usr/share/nginx/html/error-pages; internal; + #access_log off; } diff --git a/share/nginx/html/error-pages/403.html b/share/nginx/html/error-pages/403.html new file mode 100644 index 0000000..bd624ed --- /dev/null +++ b/share/nginx/html/error-pages/403.html @@ -0,0 +1,45 @@ + + + + + + + +403 Forbidden + + + + + + + +
+
+
+

Oops! Access Denied

+

403

+
+

Sorry, but you don't have permission to access this resource.

+

We are unable to fullfill your request. +Access to this resource on the server is denied.

+

For questions or problems, please contact our support team.

+

+
+
+ + + \ No newline at end of file diff --git a/share/nginx/html/error-pages/404.html b/share/nginx/html/error-pages/404.html new file mode 100644 index 0000000..3108383 --- /dev/null +++ b/share/nginx/html/error-pages/404.html @@ -0,0 +1,45 @@ + + + + + + + +404 Not Found + + + + + + + +
+
+
+

Oops! Page Not Found

+

404

+
+

Sorry, but the page you requested was not found.

+

We are unable to fullfill your request. +Rest assured we have been notified and are looking into the issue. +Please refresh your browser.

+

If the error continues, please contact our support team.

+
+
+ + + \ No newline at end of file diff --git a/share/nginx/html/error-pages/500.html b/share/nginx/html/error-pages/500.html new file mode 100644 index 0000000..d7dfc20 --- /dev/null +++ b/share/nginx/html/error-pages/500.html @@ -0,0 +1,45 @@ + + + + + + + +500 Internal Server Error + + + + + + + +
+
+
+

Oops! Internal Server Error

+

500

+
+

Unfortunately, something has gone wrong on our side.

+

We are unable to fullfill your request. +Rest assured we have been notified and are looking into the issue. +Please refresh your browser.

+

If the error continues, please contact our support team.

+
+
+ + + \ No newline at end of file diff --git a/share/nginx/html/error-pages/502.html b/share/nginx/html/error-pages/502.html new file mode 100644 index 0000000..16b2746 --- /dev/null +++ b/share/nginx/html/error-pages/502.html @@ -0,0 +1,44 @@ + + + + + + + +502 Bad Gateway + + + + + + + +
+
+
+

Oops! Bad Gateway

+

502

+
+

Sorry, our gateway is currently experiencing errors.

+

Our engineers are working to resolve this issue. +Please try accessing this resource again in a few minutes.

+

If the error continues, please contact our support team.

+
+
+ + + \ No newline at end of file diff --git a/share/nginx/html/error-pages/503.html b/share/nginx/html/error-pages/503.html new file mode 100644 index 0000000..7ccad40 --- /dev/null +++ b/share/nginx/html/error-pages/503.html @@ -0,0 +1,44 @@ + + + + + + + +503 Service Unavailable + + + + + + + +
+
+
+

Oops! Service Unavailable

+

503

+
+

Sorry, our service is temporarily unavailable.

+

The server is temporarily unabale to service your request due to maintenance downtime or capacity problem. +Please try again in a few minutes.

+

If the error continues, please contact our support team.

+
+
+ + + \ No newline at end of file diff --git a/share/nginx/html/error-pages/504.html b/share/nginx/html/error-pages/504.html new file mode 100644 index 0000000..bcfa265 --- /dev/null +++ b/share/nginx/html/error-pages/504.html @@ -0,0 +1,44 @@ + + + + + + + +504 Gateway Timeout + + + + + + + +
+
+
+

Oops! Gateway Timeout

+

504

+
+

Sorry, our gateway is currently experiencing errors.

+

Our engineers are working to resolve this issue. +Please try accessing this resource again in a few minutes.

+

If the error continues, please contact our support team.

+
+
+ + + \ No newline at end of file