You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A collection of modern, responsive, and brandable HTML error pages (e.g., 404, 500) designed to turn frustrating moments into memorable, on-brand experiences—with optional doses (customizable) of sarcasm, irony, and humor. Built for teams that want simple customization and a clean structure for deploying custom error docs across their web servers.
5
+
A collection of modern, responsive, and brandable [HTML error pages](https://www.presslabs.com/how-to/error-pages/) (e.g., `404`, `500`) designed to turn frustrating moments into memorable, on-brand experiences—with an optional dose (customizable) of sarcasm, irony, and humor. Built for server administrators who are bored with the default Apache/Nginx error docs. This repository is hosted on [GitLab](https://gitlab.com/thaikolja/modern-html-error-docs) and mirrored to [GitHub](https://github.com/thaikolja/modern-html-error-docs).
6
6
7
7
**Example for the error code 503:**
8
8
9
9

10
10
11
11
## Features
12
12
13
-
- ⚡️ **Responsive Design:** Optimized for various screen sizes, from mobile devices to large desktops.
13
+
- ⚡️ **Fast:** Only HTML, a little CSS, and Vanilla JavaScript. No additional tools needed.
14
+
- 📱 **Responsive Design:** Optimized for various screen sizes, from mobile devices to large desktops.
14
15
- 📦 **Single Source of Truth:** All error docs are managed in a central `messages.json` file for easy updates.
15
16
- 🛟 **Fallback Mechanism:** Content is displayed even if JavaScript is disabled in the browser.
16
17
- 🧹 **Organized Structure:** Clear separation of CSS, JavaScript, and image assets.
@@ -20,26 +21,25 @@ A collection of modern, responsive, and brandable HTML error pages (e.g., 404, 5
20
21
21
22
Although the error docs have been built for Linux servers, please note that the following paths and folders may not be accurate for your specific distribution.
22
23
23
-
### Prerequisites
24
+
### Requirements
24
25
25
26
- A server running Linux
26
27
- An installed web server, e.g., Apache or Nginx
27
-
- Root access or enough permissions to change default error docs
28
-
- A modern web browser
28
+
- Access to your server's standard error docs files
29
29
30
30
## Installation
31
31
32
32
> [!NOTE]
33
33
>
34
-
> For both installation versions, a Debian 12 server running Plesk, Apache, and Nginx is used. Some file paths may not be the same with your distribution.
34
+
> For this installation, a Debian 12 server running Plesk, Apache, and Nginx is used. Some file paths may differ from those in your distribution.
35
35
36
-
### Built Installation
36
+
### Install from Build
37
37
38
-
Already built version that only has to be moved to the server.
38
+
An **already built version** with minified assets and only the necessary files that need to be moved to the server.
39
39
40
-
1.Log in to your server as the root user
40
+
1.Use SSH to log in to your server as a user with enough permission (see: "Requirements")
41
41
42
-
2. Change into the directory where the error message files are being stored:
42
+
2. Change into the directory where the error message files are being stored. In this case, it's the following directory for **new domains**. Already existing domains are located in `/var/www/vhosts/DOMAIN.COM/error-docs`.
43
43
44
44
```bash
45
45
cd /var/www/vhosts/.skel/0
@@ -51,7 +51,7 @@ Already built version that only has to be moved to the server.
51
51
zip -r error-docs-backup.zip error_docs
52
52
```
53
53
54
-
4.Use `curl`or `wget` to download the built files as a .zip archive:
54
+
4.Head to the "Release" section on GitLab or GitHub and copy the URL of the latest version's .zip file:
55
55
56
56
```bash
57
57
# Using wget
@@ -64,16 +64,16 @@ Already built version that only has to be moved to the server.
64
64
5. Unzip the downloaded file `main.zip`:
65
65
66
66
```bash
67
-
unzip main.zip
67
+
unzip dist.zip
68
68
```
69
69
70
-
6.Delete the folder `error-docs` and rename your extracted `main`:
70
+
6.Backup your existing default `error-docs` and rename your extracted `dist`:
7.`cd` into `error-docs` and use `ls -la`. You should see the following file structure:
76
+
7.`cd` into `error-docs` and use `ls -l` (or `tree`, if available). You should see the following file structure:
77
77
78
78
```bash
79
79
├── assets
@@ -123,9 +123,22 @@ Already built version that only has to be moved to the server.
123
123
124
124
10. 🥳 Your Modern HTML Error Docs are successfully installed!
125
125
126
+
### Via Git
127
+
128
+
1. Clone the main repository with unminified codes:
129
+
130
+
```bash
131
+
```
132
+
133
+
2. Apply your changes.
134
+
135
+
3. Clea
136
+
126
137
## Customization
127
138
128
-
### Error docs
139
+
### Messages and Texts
140
+
141
+
These error docs
129
142
130
143
All error docs are stored in `assets/data/docs.json`. You can edit this file to change the titles, descriptions, and robot speech for each error code.
131
144
@@ -154,6 +167,12 @@ Replace or add new robot images in the `assets/img/` directory. Ensure you updat
154
167
155
168
The `assets/js/scripts.js` file handles the dynamic loading of docs from `docs.json` and can be extended for additional client-side functionality.
156
169
170
+
## What's Next
171
+
172
+
* Creating a way of easier deployment
173
+
* Accurate Linux distribution determination
174
+
* Expanding `README.md` for the most used Linux distributions
175
+
157
176
## Contributing
158
177
159
178
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
0 commit comments