From e28ea51c261bf75f3c1a546935623160879786d9 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Tue, 4 Oct 2016 19:02:13 +0200 Subject: Initial commit. --- conf-available/errorpage.conf | 42 ++++++++++++++++++++++++++++++++++++++ customization/errorpage/400.shtml | 5 +++++ customization/errorpage/401.shtml | 5 +++++ customization/errorpage/403.shtml | 5 +++++ customization/errorpage/404.shtml | 5 +++++ customization/errorpage/405.shtml | 5 +++++ customization/errorpage/408.shtml | 5 +++++ customization/errorpage/409.shtml | 5 +++++ customization/errorpage/410.shtml | 5 +++++ customization/errorpage/411.shtml | 5 +++++ customization/errorpage/412.shtml | 5 +++++ customization/errorpage/413.shtml | 5 +++++ customization/errorpage/414.shtml | 5 +++++ customization/errorpage/415.shtml | 5 +++++ customization/errorpage/500.shtml | 5 +++++ customization/errorpage/501.shtml | 5 +++++ customization/errorpage/503.shtml | 5 +++++ customization/errorpage/504.shtml | 5 +++++ customization/errorpage/main.shtml | 41 +++++++++++++++++++++++++++++++++++++ readme.md | 18 ++++++++++++++++ 20 files changed, 186 insertions(+) create mode 100644 conf-available/errorpage.conf create mode 100644 customization/errorpage/400.shtml create mode 100644 customization/errorpage/401.shtml create mode 100644 customization/errorpage/403.shtml create mode 100644 customization/errorpage/404.shtml create mode 100644 customization/errorpage/405.shtml create mode 100644 customization/errorpage/408.shtml create mode 100644 customization/errorpage/409.shtml create mode 100644 customization/errorpage/410.shtml create mode 100644 customization/errorpage/411.shtml create mode 100644 customization/errorpage/412.shtml create mode 100644 customization/errorpage/413.shtml create mode 100644 customization/errorpage/414.shtml create mode 100644 customization/errorpage/415.shtml create mode 100644 customization/errorpage/500.shtml create mode 100644 customization/errorpage/501.shtml create mode 100644 customization/errorpage/503.shtml create mode 100644 customization/errorpage/504.shtml create mode 100644 customization/errorpage/main.shtml create mode 100644 readme.md diff --git a/conf-available/errorpage.conf b/conf-available/errorpage.conf new file mode 100644 index 0000000..e52fb3f --- /dev/null +++ b/conf-available/errorpage.conf @@ -0,0 +1,42 @@ + + Alias /errorpage/400 /etc/apache2/customization/errorpage/400.shtml + Alias /errorpage/401 /etc/apache2/customization/errorpage/401.shtml + Alias /errorpage/403 /etc/apache2/customization/errorpage/403.shtml + Alias /errorpage/404 /etc/apache2/customization/errorpage/404.shtml + Alias /errorpage/405 /etc/apache2/customization/errorpage/405.shtml + Alias /errorpage/408 /etc/apache2/customization/errorpage/408.shtml + Alias /errorpage/409 /etc/apache2/customization/errorpage/409.shtml + Alias /errorpage/410 /etc/apache2/customization/errorpage/410.shtml + Alias /errorpage/411 /etc/apache2/customization/errorpage/411.shtml + Alias /errorpage/412 /etc/apache2/customization/errorpage/412.shtml + 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/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 + Alias /errorpage/504 /etc/apache2/customization/errorpage/504.shtml + + ErrorDocument 400 /errorpage/400 + ErrorDocument 401 /errorpage/401 + ErrorDocument 403 /errorpage/403 + ErrorDocument 404 /errorpage/404 + ErrorDocument 405 /errorpage/405 + ErrorDocument 408 /errorpage/408 + ErrorDocument 409 /errorpage/409 + ErrorDocument 410 /errorpage/410 + ErrorDocument 411 /errorpage/411 + ErrorDocument 412 /errorpage/412 + ErrorDocument 413 /errorpage/413 + ErrorDocument 414 /errorpage/414 + ErrorDocument 415 /errorpage/415 + ErrorDocument 500 /errorpage/500 + ErrorDocument 501 /errorpage/501 + ErrorDocument 503 /errorpage/503 + ErrorDocument 504 /errorpage/504 + + + Options +Includes + Require all granted + + diff --git a/customization/errorpage/400.shtml b/customization/errorpage/400.shtml new file mode 100644 index 0000000..385c7a9 --- /dev/null +++ b/customization/errorpage/400.shtml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/customization/errorpage/401.shtml b/customization/errorpage/401.shtml new file mode 100644 index 0000000..80a197c --- /dev/null +++ b/customization/errorpage/401.shtml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/customization/errorpage/403.shtml b/customization/errorpage/403.shtml new file mode 100644 index 0000000..4aa3b64 --- /dev/null +++ b/customization/errorpage/403.shtml @@ -0,0 +1,5 @@ + + + + + diff --git a/customization/errorpage/404.shtml b/customization/errorpage/404.shtml new file mode 100644 index 0000000..1139aaa --- /dev/null +++ b/customization/errorpage/404.shtml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/customization/errorpage/405.shtml b/customization/errorpage/405.shtml new file mode 100644 index 0000000..0dbcc7b --- /dev/null +++ b/customization/errorpage/405.shtml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/customization/errorpage/408.shtml b/customization/errorpage/408.shtml new file mode 100644 index 0000000..c6ab88a --- /dev/null +++ b/customization/errorpage/408.shtml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/customization/errorpage/409.shtml b/customization/errorpage/409.shtml new file mode 100644 index 0000000..dccd853 --- /dev/null +++ b/customization/errorpage/409.shtml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/customization/errorpage/410.shtml b/customization/errorpage/410.shtml new file mode 100644 index 0000000..1e2b65f --- /dev/null +++ b/customization/errorpage/410.shtml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/customization/errorpage/411.shtml b/customization/errorpage/411.shtml new file mode 100644 index 0000000..0b7ac1e --- /dev/null +++ b/customization/errorpage/411.shtml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/customization/errorpage/412.shtml b/customization/errorpage/412.shtml new file mode 100644 index 0000000..1d9f9da --- /dev/null +++ b/customization/errorpage/412.shtml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/customization/errorpage/413.shtml b/customization/errorpage/413.shtml new file mode 100644 index 0000000..f772be8 --- /dev/null +++ b/customization/errorpage/413.shtml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/customization/errorpage/414.shtml b/customization/errorpage/414.shtml new file mode 100644 index 0000000..bad1228 --- /dev/null +++ b/customization/errorpage/414.shtml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/customization/errorpage/415.shtml b/customization/errorpage/415.shtml new file mode 100644 index 0000000..dc49b75 --- /dev/null +++ b/customization/errorpage/415.shtml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/customization/errorpage/500.shtml b/customization/errorpage/500.shtml new file mode 100644 index 0000000..d08dfbc --- /dev/null +++ b/customization/errorpage/500.shtml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/customization/errorpage/501.shtml b/customization/errorpage/501.shtml new file mode 100644 index 0000000..cca0cbb --- /dev/null +++ b/customization/errorpage/501.shtml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/customization/errorpage/503.shtml b/customization/errorpage/503.shtml new file mode 100644 index 0000000..5c28812 --- /dev/null +++ b/customization/errorpage/503.shtml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/customization/errorpage/504.shtml b/customization/errorpage/504.shtml new file mode 100644 index 0000000..8dcc94d --- /dev/null +++ b/customization/errorpage/504.shtml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/customization/errorpage/main.shtml b/customization/errorpage/main.shtml new file mode 100644 index 0000000..a8a408b --- /dev/null +++ b/customization/errorpage/main.shtml @@ -0,0 +1,41 @@ + + + + + + + <!--#echo var="ERRORPAGE_CODE" --> <!--#echo var="ERRORPAGE_TEXT" --> + + +
+

+
+
+ + + + diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..b459088 --- /dev/null +++ b/readme.md @@ -0,0 +1,18 @@ +# Errorpage customization for Apache HTTP server +This package configures your Apache HTTP server to use custom error pages instead of the default ones (with old and invalid HTML markup). + +## Dependencies +This customization requires that your Apache HTTP server is equal to or greater than **2.4** in the version. In addition, the following modules needs to be enabled: + +* `mod_alias`: +* `mod_include`: + +## SSI variables +The following variables are defined within each `xxx.shtml` file within the `customization/errorpage/` directory: + +* `ERRORPAGE_CODE`: This variable contains the HTTP status code for the current error or information page. +* `ERRORPAGE_TEXT`: This variable contains the description of the HTTP status code defined with `ERRORPAGE_CODE`. +* `ERRORPAGE_INFO`: This variable contains an additional and *meaningful* description for the user about the current page. + +## Installation +All files and directories provided in this package are relative to the `/etc/apache2/` (depends on the system you use) directory. To activate the configuration, just execute `a2enconf errorpage` and reload the configuration with `systemctl reload apache2`. \ No newline at end of file -- cgit v1.2.3