aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2017-08-28 08:17:32 +0200
committerThomas Lange <code@nerdmind.de>2017-08-28 08:17:32 +0200
commit43c9b35deb674509203c6991fbdab2fc6594df28 (patch)
tree7ba20650024d4b12eb2811d98fe5abc84583e979
parentab57e162e18ed132d435a09634869d46925cbe2e (diff)
downloadapache-errorpage-43c9b35deb674509203c6991fbdab2fc6594df28.tar.gz
apache-errorpage-43c9b35deb674509203c6991fbdab2fc6594df28.tar.xz
apache-errorpage-43c9b35deb674509203c6991fbdab2fc6594df28.zip
There are now separate files for header and footer, which simplifies the creation of error messages, since you can now output HTML code directly instead of defining the message into a variable which escapes the containing HTML code. In addition, a new error page for "429 Too Many Requests" has been added and a little change in the stylesheet was made.
-rw-r--r--conf-available/errorpage.conf2
-rw-r--r--customization/errorpage/400.shtml5
-rw-r--r--customization/errorpage/401.shtml5
-rw-r--r--customization/errorpage/403.shtml5
-rw-r--r--customization/errorpage/404.shtml5
-rw-r--r--customization/errorpage/405.shtml5
-rw-r--r--customization/errorpage/408.shtml5
-rw-r--r--customization/errorpage/409.shtml5
-rw-r--r--customization/errorpage/410.shtml5
-rw-r--r--customization/errorpage/411.shtml5
-rw-r--r--customization/errorpage/412.shtml5
-rw-r--r--customization/errorpage/413.shtml5
-rw-r--r--customization/errorpage/414.shtml5
-rw-r--r--customization/errorpage/415.shtml5
-rw-r--r--customization/errorpage/429.shtml7
-rw-r--r--customization/errorpage/500.shtml5
-rw-r--r--customization/errorpage/501.shtml5
-rw-r--r--customization/errorpage/503.shtml5
-rw-r--r--customization/errorpage/504.shtml5
-rw-r--r--customization/errorpage/footer.shtml3
-rw-r--r--customization/errorpage/header.shtml (renamed from customization/errorpage/main.shtml)8
21 files changed, 65 insertions, 40 deletions
diff --git a/conf-available/errorpage.conf b/conf-available/errorpage.conf
index e52fb3f..26071e6 100644
--- a/conf-available/errorpage.conf
+++ b/conf-available/errorpage.conf
@@ -12,6 +12,7 @@
Alias /errorpage/413 /etc/apache2/customization/errorpage/413.shtml
Alias /errorpage/414 /etc/apache2/customization/errorpage/414.shtml
Alias /errorpage/415 /etc/apache2/customization/errorpage/415.shtml
+ Alias /errorpage/429 /etc/apache2/customization/errorpage/429.shtml
Alias /errorpage/500 /etc/apache2/customization/errorpage/500.shtml
Alias /errorpage/501 /etc/apache2/customization/errorpage/501.shtml
Alias /errorpage/503 /etc/apache2/customization/errorpage/503.shtml
@@ -30,6 +31,7 @@
ErrorDocument 413 /errorpage/413
ErrorDocument 414 /errorpage/414
ErrorDocument 415 /errorpage/415
+ ErrorDocument 429 /errorpage/429
ErrorDocument 500 /errorpage/500
ErrorDocument 501 /errorpage/501
ErrorDocument 503 /errorpage/503
diff --git a/customization/errorpage/400.shtml b/customization/errorpage/400.shtml
index 385c7a9..90e2e15 100644
--- a/customization/errorpage/400.shtml
+++ b/customization/errorpage/400.shtml
@@ -1,5 +1,6 @@
<!--#set var="ERRORPAGE_CODE" value="400" -->
<!--#set var="ERRORPAGE_TEXT" value="Bad Request" -->
-<!--#set var="ERRORPAGE_INFO" value="Your browser (or proxy) sent a request that this server could not understand." -->
-<!--#include file="main.shtml" --> \ No newline at end of file
+<!--#include file="header.shtml" -->
+ <div>Your browser (or proxy) sent a request that this server could not understand.</div>
+<!--#include file="footer.shtml" --> \ No newline at end of file
diff --git a/customization/errorpage/401.shtml b/customization/errorpage/401.shtml
index 80a197c..d6cfe68 100644
--- a/customization/errorpage/401.shtml
+++ b/customization/errorpage/401.shtml
@@ -1,5 +1,6 @@
<!--#set var="ERRORPAGE_CODE" value="401" -->
<!--#set var="ERRORPAGE_TEXT" value="Unauthorized" -->
-<!--#set var="ERRORPAGE_INFO" value="This server could not verify that you are authorized to access this resource." -->
-<!--#include file="main.shtml" --> \ No newline at end of file
+<!--#include file="header.shtml" -->
+ <div>This server could not verify that you are authorized to access this resource.</div>
+<!--#include file="footer.shtml" --> \ No newline at end of file
diff --git a/customization/errorpage/403.shtml b/customization/errorpage/403.shtml
index 4aa3b64..fb59017 100644
--- a/customization/errorpage/403.shtml
+++ b/customization/errorpage/403.shtml
@@ -1,5 +1,6 @@
<!--#set var="ERRORPAGE_CODE" value="403" -->
<!--#set var="ERRORPAGE_TEXT" value="Forbidden" -->
-<!--#set var="ERRORPAGE_INFO" value="You don't have permission to access the requested resource." -->
-<!--#include file="main.shtml" -->
+<!--#include file="header.shtml" -->
+ <div>You don't have permission to access the requested resource.</div>
+<!--#include file="footer.shtml" --> \ No newline at end of file
diff --git a/customization/errorpage/404.shtml b/customization/errorpage/404.shtml
index 1139aaa..714e4e0 100644
--- a/customization/errorpage/404.shtml
+++ b/customization/errorpage/404.shtml
@@ -1,5 +1,6 @@
<!--#set var="ERRORPAGE_CODE" value="404" -->
<!--#set var="ERRORPAGE_TEXT" value="Not Found" -->
-<!--#set var="ERRORPAGE_INFO" value="The requested resource was not found on this server." -->
-<!--#include file="main.shtml" --> \ No newline at end of file
+<!--#include file="header.shtml" -->
+ <div>The requested resource was not found on this server.</div>
+<!--#include file="footer.shtml" --> \ No newline at end of file
diff --git a/customization/errorpage/405.shtml b/customization/errorpage/405.shtml
index 0dbcc7b..2e699cc 100644
--- a/customization/errorpage/405.shtml
+++ b/customization/errorpage/405.shtml
@@ -1,5 +1,6 @@
<!--#set var="ERRORPAGE_CODE" value="405" -->
<!--#set var="ERRORPAGE_TEXT" value="Method Not Allowed" -->
-<!--#set var="ERRORPAGE_INFO" value="The request method, with which the server has been requested is not allowed." -->
-<!--#include file="main.shtml" --> \ No newline at end of file
+<!--#include file="header.shtml" -->
+ <div>The request method, with which the server has been requested is not allowed.</div>
+<!--#include file="footer.shtml" --> \ No newline at end of file
diff --git a/customization/errorpage/408.shtml b/customization/errorpage/408.shtml
index c6ab88a..09ed971 100644
--- a/customization/errorpage/408.shtml
+++ b/customization/errorpage/408.shtml
@@ -1,5 +1,6 @@
<!--#set var="ERRORPAGE_CODE" value="408" -->
<!--#set var="ERRORPAGE_TEXT" value="Request Timeout" -->
-<!--#set var="ERRORPAGE_INFO" value="The server closed the network connection because the client didn't finish the request within the specified time." -->
-<!--#include file="main.shtml" --> \ No newline at end of file
+<!--#include file="header.shtml" -->
+ <div>The server closed the network connection because the client didn't finish the request within the specified time.</div>
+<!--#include file="footer.shtml" --> \ No newline at end of file
diff --git a/customization/errorpage/409.shtml b/customization/errorpage/409.shtml
index dccd853..c59360c 100644
--- a/customization/errorpage/409.shtml
+++ b/customization/errorpage/409.shtml
@@ -1,5 +1,6 @@
<!--#set var="ERRORPAGE_CODE" value="409" -->
<!--#set var="ERRORPAGE_TEXT" value="Conflict" -->
-<!--#set var="ERRORPAGE_INFO" value="" -->
-<!--#include file="main.shtml" --> \ No newline at end of file
+<!--#include file="header.shtml" -->
+ <div>The request could not be completed due to a conflict with the current state of the resource.</div>
+<!--#include file="footer.shtml" --> \ No newline at end of file
diff --git a/customization/errorpage/410.shtml b/customization/errorpage/410.shtml
index 1e2b65f..ac56756 100644
--- a/customization/errorpage/410.shtml
+++ b/customization/errorpage/410.shtml
@@ -1,5 +1,6 @@
<!--#set var="ERRORPAGE_CODE" value="410" -->
<!--#set var="ERRORPAGE_TEXT" value="Gone" -->
-<!--#set var="ERRORPAGE_INFO" value="The requested resource is no longer available on this server and there is no forwarding address." -->
-<!--#include file="main.shtml" --> \ No newline at end of file
+<!--#include file="header.shtml" -->
+ <div>The requested resource is no longer available on this server and there is no forwarding address.</div>
+<!--#include file="footer.shtml" --> \ No newline at end of file
diff --git a/customization/errorpage/411.shtml b/customization/errorpage/411.shtml
index 0b7ac1e..253c59e 100644
--- a/customization/errorpage/411.shtml
+++ b/customization/errorpage/411.shtml
@@ -1,5 +1,6 @@
<!--#set var="ERRORPAGE_CODE" value="411" -->
<!--#set var="ERRORPAGE_TEXT" value="Length Required" -->
-<!--#set var="ERRORPAGE_INFO" value="The request method, with which the server has been requested requires a valid <code>Content-Length</code> header." -->
-<!--#include file="main.shtml" --> \ No newline at end of file
+<!--#include file="header.shtml" -->
+ <div>The request method, with which the server has been requested requires a valid <code>Content-Length</code> header.</div>
+<!--#include file="footer.shtml" --> \ No newline at end of file
diff --git a/customization/errorpage/412.shtml b/customization/errorpage/412.shtml
index 1d9f9da..ac3cf35 100644
--- a/customization/errorpage/412.shtml
+++ b/customization/errorpage/412.shtml
@@ -1,5 +1,6 @@
<!--#set var="ERRORPAGE_CODE" value="412" -->
<!--#set var="ERRORPAGE_TEXT" value="Precondition Failed" -->
-<!--#set var="ERRORPAGE_INFO" value="The precondition on the request for the URL failed positive evaluation." -->
-<!--#include file="main.shtml" --> \ No newline at end of file
+<!--#include file="header.shtml" -->
+ <div>The precondition on the request for the URL failed positive evaluation.</div>
+<!--#include file="footer.shtml" --> \ No newline at end of file
diff --git a/customization/errorpage/413.shtml b/customization/errorpage/413.shtml
index f772be8..4814ee4 100644
--- a/customization/errorpage/413.shtml
+++ b/customization/errorpage/413.shtml
@@ -1,5 +1,6 @@
<!--#set var="ERRORPAGE_CODE" value="413" -->
<!--#set var="ERRORPAGE_TEXT" value="Payload Too Large" -->
-<!--#set var="ERRORPAGE_INFO" value="The request method, with which the server has been requested does not allow the data transmitted, or the data volume exceeds the capacity limit." -->
-<!--#include file="main.shtml" --> \ No newline at end of file
+<!--#include file="header.shtml" -->
+ <div>The request method, with which the server has been requested does not allow the data transmitted, or the data volume exceeds the capacity limit.</div>
+<!--#include file="footer.shtml" --> \ No newline at end of file
diff --git a/customization/errorpage/414.shtml b/customization/errorpage/414.shtml
index bad1228..f3ad112 100644
--- a/customization/errorpage/414.shtml
+++ b/customization/errorpage/414.shtml
@@ -1,5 +1,6 @@
<!--#set var="ERRORPAGE_CODE" value="414" -->
<!--#set var="ERRORPAGE_TEXT" value="Request-URI Too Large" -->
-<!--#set var="ERRORPAGE_INFO" value="The length of the requested URL exceeds the capacity limit for this server. The request cannot be processed." -->
-<!--#include file="main.shtml" --> \ No newline at end of file
+<!--#include file="header.shtml" -->
+ <div>The length of the requested URL exceeds the capacity limit for this server. The request cannot be processed.</div>
+<!--#include file="footer.shtml" --> \ No newline at end of file
diff --git a/customization/errorpage/415.shtml b/customization/errorpage/415.shtml
index dc49b75..939ff24 100644
--- a/customization/errorpage/415.shtml
+++ b/customization/errorpage/415.shtml
@@ -1,5 +1,6 @@
<!--#set var="ERRORPAGE_CODE" value="415" -->
<!--#set var="ERRORPAGE_TEXT" value="Unsupported Media Type" -->
-<!--#set var="ERRORPAGE_INFO" value="The server does not support the media type transmitted in the request." -->
-<!--#include file="main.shtml" --> \ No newline at end of file
+<!--#include file="header.shtml" -->
+ <div>The server does not support the media type transmitted in the request.</div>
+<!--#include file="footer.shtml" --> \ No newline at end of file
diff --git a/customization/errorpage/429.shtml b/customization/errorpage/429.shtml
new file mode 100644
index 0000000..cc2b31f
--- /dev/null
+++ b/customization/errorpage/429.shtml
@@ -0,0 +1,7 @@
+<!--#set var="ERRORPAGE_CODE" value="429" -->
+<!--#set var="ERRORPAGE_TEXT" value="Too Many Requests" -->
+
+<!--#include file="header.shtml" -->
+ <div>The server has detected an unusually high number of requests from your network address <strong><span><!--#echo var="REMOTE_ADDR" --></span></strong>
+ and will not process further requests until the flooding has subsided.</div>
+<!--#include file="footer.shtml" --> \ No newline at end of file
diff --git a/customization/errorpage/500.shtml b/customization/errorpage/500.shtml
index d08dfbc..6214974 100644
--- a/customization/errorpage/500.shtml
+++ b/customization/errorpage/500.shtml
@@ -1,5 +1,6 @@
<!--#set var="ERRORPAGE_CODE" value="500" -->
<!--#set var="ERRORPAGE_TEXT" value="Internal Server Error" -->
-<!--#set var="ERRORPAGE_INFO" value="The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script." -->
-<!--#include file="main.shtml" --> \ No newline at end of file
+<!--#include file="header.shtml" -->
+ <div>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.</div>
+<!--#include file="footer.shtml" --> \ No newline at end of file
diff --git a/customization/errorpage/501.shtml b/customization/errorpage/501.shtml
index cca0cbb..3760c9f 100644
--- a/customization/errorpage/501.shtml
+++ b/customization/errorpage/501.shtml
@@ -1,5 +1,6 @@
<!--#set var="ERRORPAGE_CODE" value="501" -->
<!--#set var="ERRORPAGE_TEXT" value="Not Implemented" -->
-<!--#set var="ERRORPAGE_INFO" value="The server does not support the action requested by the client." -->
-<!--#include file="main.shtml" --> \ No newline at end of file
+<!--#include file="header.shtml" -->
+ <div>The server does not support the action requested by the client.</div>
+<!--#include file="footer.shtml" --> \ No newline at end of file
diff --git a/customization/errorpage/503.shtml b/customization/errorpage/503.shtml
index 5c28812..67e6861 100644
--- a/customization/errorpage/503.shtml
+++ b/customization/errorpage/503.shtml
@@ -1,5 +1,6 @@
<!--#set var="ERRORPAGE_CODE" value="503" -->
<!--#set var="ERRORPAGE_TEXT" value="Service Unavailable" -->
-<!--#set var="ERRORPAGE_INFO" value="The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later." -->
-<!--#include file="main.shtml" --> \ No newline at end of file
+<!--#include file="header.shtml" -->
+ <div>The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.</div>
+<!--#include file="footer.shtml" --> \ No newline at end of file
diff --git a/customization/errorpage/504.shtml b/customization/errorpage/504.shtml
index 8dcc94d..1764e5d 100644
--- a/customization/errorpage/504.shtml
+++ b/customization/errorpage/504.shtml
@@ -1,5 +1,6 @@
<!--#set var="ERRORPAGE_CODE" value="504" -->
<!--#set var="ERRORPAGE_TEXT" value="Gateway Timeout" -->
-<!--#set var="ERRORPAGE_INFO" value="The gateway did not receive a timely response from the upstream server or application." -->
-<!--#include file="main.shtml" --> \ No newline at end of file
+<!--#include file="header.shtml" -->
+ <div>The gateway did not receive a timely response from the upstream server or application.</div>
+<!--#include file="footer.shtml" --> \ No newline at end of file
diff --git a/customization/errorpage/footer.shtml b/customization/errorpage/footer.shtml
new file mode 100644
index 0000000..8959bbd
--- /dev/null
+++ b/customization/errorpage/footer.shtml
@@ -0,0 +1,3 @@
+ </main>
+</body>
+</html> \ No newline at end of file
diff --git a/customization/errorpage/main.shtml b/customization/errorpage/header.shtml
index 1c34a77..0c0a526 100644
--- a/customization/errorpage/main.shtml
+++ b/customization/errorpage/header.shtml
@@ -7,14 +7,14 @@
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/* Headings
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
- h1{font-size:1.4rem;margin:0.5rem 0;padding:0;font-weight:400;}
+ h1{font-size:1.4rem;margin:0.5rem 0;padding:0;font-weight:400;text-decoration:underline;}
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/* Main
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
html{margin:0;padding:0;height:100%;box-sizing:border-box;font-size:1.25rem;font-family:'Share Tech Mono',sans-serif;color:#333;background:#EEE;}
body{margin:0;padding:0;height:100%;box-sizing:border-box;font-size:1.00rem;line-height:1.20rem;display:flex;text-align:center;}
- main{margin:auto;max-width:35rem;}p{margin:0.5rem 0;}div{font-size:0.8rem;color:#0060A0;}
+ main{margin:auto;max-width:40rem;}div{font-size:0.8rem;color:#0060A0;}span{color:#C45C66;}
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/* Responsive
@@ -35,7 +35,3 @@
<body>
<main>
<h1><!--#echo var="ERRORPAGE_CODE" --> <!--#echo var="ERRORPAGE_TEXT" --></h1>
- <div><!--#echo var="ERRORPAGE_INFO" --></div>
- </main>
-</body>
-</html> \ No newline at end of file