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
These Apache Error Pages project is a drop-in replacement of beautifully designed, user-friendly Apache 2 error pages. If you're tired of having _boring_ Apache error pages displayed to users then these might just be the solution for you.
4
4
5
+
As of Version 2.0.0 there is now additional support for Nginx, Microsoft IIS and other webservers. Installation instructions are similar to Apache 2 and more details are contained below.
* [Copying the Error Pages](#copying-the-error-pages)
21
+
* [Additional Server Support](#additional-server-support)
19
22
* [Modifying your Apache Config file](#modifying-your-apache-config-file)
20
23
*[Minification Setup](#minification-setup)
21
24
* [Dependencies](#dependencies)
@@ -24,12 +27,15 @@ These Apache Error Pages project is a drop-in replacement of beautifully designe
24
27
* [Installing postcss](#installing-postcss)
25
28
* [Installing uglify-js](#installing-uglify-js)
26
29
* [Running the minify script](#running-the-minify-script)
30
+
* [Additional scripts](#additional-scripts)
31
+
* [Nginx](#nginx)
32
+
* [Microsoft IIS](#microsoft-iis)
33
+
* [Other](#other)
27
34
*[Contributing](#contributing)
28
35
*[Code of Conduct](#code-of-conduct)
29
36
*[Versioning](#versioning)
30
37
*[Change-Log](#change-log)
31
38
*[Authors](#authors)
32
-
*[TODO](#todo)
33
39
*[License](#license)
34
40
*[Acknowledgements](#acknowledgements)
35
41
@@ -41,7 +47,12 @@ These Apache Error Pages project is a drop-in replacement of beautifully designe
41
47
* A compressed distribution **file size which totals only `78 KB`** (from `111 KB`) and includes Images, CSS, HTML and JavaScript. Total package size is `2.1 MB` with all the _Font Awesome_ and _Web Fonts_ included.
42
48
* Fully responsive templates, **works across desktop, tablet and mobile** phones.
43
49
* Animated text, **creating the experience of a terminal console**, outputting the respective error code to screen.
44
-
* There are **27 templates**, 20 exclusively for Apache with an additional 7 for other web-servers. Enjoy!
50
+
* Now **full support for Nginx, Microsoft IIS and other webservers** which are non-Apache related.
51
+
* There are **54 templates**:
52
+
***38** exclusively for Apache.
53
+
***6** for `Nginx`.
54
+
***7**`non-Apache` HTTP status codes templates.
55
+
***3** for `Microsoft Internet Information Services`.
45
56
* Each template, as well as all CSS files, have been minified to ensure the **smallest file size possible**.
46
57
***Font Awesome icons** used in error messages.
47
58
@@ -73,7 +84,7 @@ These Apache Error Pages project is a drop-in replacement of beautifully designe
73
84
74
85
## Installation
75
86
76
-
Installing the drop-in replacement for Apache 2 error pages comes in two parts. First, you need to copy all the files contained within the `/dist/` folder to a location on your server. Second, you need to edit your `apache.conf` or `httpd.conf` file to link the error pages to your server installation.
87
+
Installing the drop-in replacement for Apache 2 error pages comes in two parts. First, you need to copy all the files contained within the `/dist/apache/` folder to a location on your server. Second, you need to edit your `apache.conf` or `httpd.conf` file to link the error pages to your server installation.
77
88
78
89
### Copying the Error Pages
79
90
@@ -83,11 +94,11 @@ Do not replace the default error pages with this project's files. Instead, insta
$ chown -R www:apache /usr/local/var/www/error-pages # see note below.
88
99
```
89
100
90
-
**NB: _Ensure that you replace `www` and `apache`, in the `chown` command above, with your web-server's default user and group._**
101
+
**Note: _Ensure that you replace `www` and `apache`, in the `chown` command above, with your web-server's default user and group._**
91
102
92
103
Check to see if you have all the required files.
93
104
@@ -107,22 +118,36 @@ Make sure that you have the following file structure below.
107
118
├── 406.html
108
119
├── 407.html
109
120
├── 408.html
121
+
├── 409.html
122
+
├── 410.html
110
123
├── 411.html
124
+
├── 412.html
111
125
├── 413.html
112
126
├── 414.html
113
127
├── 415.html
114
-
├── 420.html
128
+
├── 416.html
129
+
├── 417.html
130
+
├── 418.html
131
+
├── 421.html
132
+
├── 422.html
133
+
├── 423.html
134
+
├── 424.html
135
+
├── 426.html
136
+
├── 428.html
115
137
├── 429.html
116
138
├── 431.html
139
+
├── 451.html
117
140
├── 500.html
118
141
├── 501.html
119
142
├── 502.html
120
143
├── 503.html
121
144
├── 504.html
122
145
├── 505.html
123
-
├── 900.html
124
-
├── 901.html
125
-
├── 902.html
146
+
├── 506.html
147
+
├── 507.html
148
+
├── 508.html
149
+
├── 510.html
150
+
├── 511.html
126
151
├── assets
127
152
│ └── imac.svg
128
153
├── css
@@ -151,8 +176,20 @@ Make sure that you have the following file structure below.
151
176
├── fa-solid-900.ttf
152
177
├── fa-solid-900.woff
153
178
└── fa-solid-900.woff2
179
+
180
+
3 directories, 63 files
154
181
```
155
182
183
+
### Additional Server Support
184
+
185
+
In addition to the above Apache 2 error pages there is also support for additional webservers. You can find production-ready, minified template files for the following webservers:
186
+
187
+
* Nginx files located at `dist/nginx/`
188
+
* Microsoft IIS files located at `dist/ms-iis/`
189
+
* Other webserver files located at `dist/other/`
190
+
191
+
You can copy the template files required from any of these additional webserver folders to your server installation.
192
+
156
193
### Modifying your Apache Config file
157
194
158
195
Once you have your files in the right location you can now edit either your `apache.conf` or `httpd.conf` file, depending on your particular installation.
# ErrorDocument 418 /ErrorPages/418.html (this isn't working and not sure why)
298
+
ErrorDocument 421 /ErrorPages/421.html
299
+
ErrorDocument 422 /ErrorPages/422.html
300
+
ErrorDocument 423 /ErrorPages/423.html
301
+
ErrorDocument 424 /ErrorPages/424.html
302
+
ErrorDocument 426 /ErrorPages/426.html
303
+
ErrorDocument 428 /ErrorPages/428.html
255
304
ErrorDocument 429 /ErrorPages/429.html
256
305
ErrorDocument 431 /ErrorPages/431.html
306
+
ErrorDocument 451 /ErrorPages/451.html
257
307
ErrorDocument 500 /ErrorPages/500.html
258
308
ErrorDocument 501 /ErrorPages/501.html
259
309
ErrorDocument 502 /ErrorPages/502.html
260
310
ErrorDocument 503 /ErrorPages/503.html
261
311
ErrorDocument 504 /ErrorPages/504.html
262
312
ErrorDocument 505 /ErrorPages/505.html
313
+
ErrorDocument 506 /ErrorPages/506.html
314
+
ErrorDocument 507 /ErrorPages/507.html
315
+
ErrorDocument 508 /ErrorPages/508.html
316
+
ErrorDocument 510 /ErrorPages/510.html
317
+
ErrorDocument 511 /ErrorPages/511.html
263
318
```
264
319
265
320
Save your file and then test your configuration changes by executing the following.
@@ -332,7 +387,7 @@ $ cd src/
332
387
$ ./scripts/minify
333
388
334
389
# expected output when executing `minify`:
335
-
The ../dist folder has been reset.
390
+
The ../dist/apache folder has been reset.
336
391
400.html minified
337
392
401.html minified
338
393
403.html minified
@@ -341,30 +396,114 @@ The ../dist folder has been reset.
341
396
406.html minified
342
397
407.html minified
343
398
408.html minified
399
+
409.html minified
400
+
410.html minified
344
401
411.html minified
402
+
412.html minified
345
403
413.html minified
346
404
414.html minified
347
405
415.html minified
406
+
416.html minified
407
+
417.html minified
408
+
418.html minified
409
+
421.html minified
410
+
422.html minified
411
+
423.html minified
412
+
424.html minified
413
+
426.html minified
414
+
428.html minified
348
415
429.html minified
349
416
431.html minified
417
+
451.html minified
350
418
500.html minified
351
419
501.html minified
352
420
502.html minified
353
421
503.html minified
354
422
504.html minified
355
423
505.html minified
424
+
506.html minified
425
+
507.html minified
426
+
508.html minified
427
+
510.html minified
428
+
511.html minified
356
429
All the CSS files have now been minified.
357
430
Minification Complete!
358
431
```
359
432
360
433
There are no options for running this script. Executing this command will:
361
434
362
-
* Delete the `/dist/css/` folder.
363
-
* Delete all the error pages with `rm -f ../dist/*.html`.
364
-
* Recreate the `/dist/css/` folder.
435
+
* Delete the `/dist/apache/css/` folder.
436
+
* Delete all the error pages with `rm -f ../dist/apache/*.html`.
437
+
* Recreate the `/dist/apache/css/` folder.
365
438
* Minify the HTML for all files in the `/src/` directory.
366
439
* Minify the CSS for all the files in `/src/css/` directory.
367
-
* Output the HTML and CSS to the `/dist/` folder.
440
+
* Output the HTML and CSS to the `/dist/apache/` folder.
441
+
442
+
#### Additional scripts
443
+
444
+
##### Nginx
445
+
446
+
There are additional templates which are used only by `nginx`. These templates are included in the `dist/nginx/` folder and the script below will minify the files for this folder.
447
+
448
+
```bash
449
+
$ cd src/
450
+
$ ./scripts/minify_nginx
451
+
452
+
# expected output when executing `minify_nginx`:
453
+
The ../dist/nginx folder has been reset.
454
+
444.html minified
455
+
494.html minified
456
+
495.html minified
457
+
496.html minified
458
+
497.html minified
459
+
499.html minified
460
+
All the CSS files have now been minified.
461
+
Copying the /assets/ folder across...
462
+
Copying the /webfonts/ folder across...
463
+
Minification Complete!
464
+
```
465
+
466
+
##### Microsoft IIS
467
+
468
+
There are additional templates which are used only by Microsoft Internet Information Services. These templates are included in the `dist/ms-iis/` folder and the script below will minify the files for this folder.
469
+
470
+
```bash
471
+
$ cd src/
472
+
$ ./scripts/minify_iis
473
+
474
+
# expected output when executing `minify_iis`:
475
+
The ../dist/ms-iis folder has been reset.
476
+
440.html minified
477
+
449.html minified
478
+
451.html minified
479
+
All the CSS files have now been minified.
480
+
Copying the /assets/ folder across...
481
+
Copying the /webfonts/ folder across...
482
+
Minification Complete!
483
+
```
484
+
485
+
##### Other
486
+
487
+
There are additional templates which are used only by other webservers. These templates are included in the `dist/other/` folder and the script below will minify the files for this folder.
488
+
489
+
```bash
490
+
$ cd src/
491
+
$ ./scripts/minify_other
492
+
493
+
# expected output when executing `minify_other`:
494
+
The ../dist/other folder has been reset.
495
+
420.html minified
496
+
520.html minified
497
+
521.html minified
498
+
533.html minified
499
+
900.html minified
500
+
901.html minified
501
+
902.html minified
502
+
All the CSS files have now been minified.
503
+
Copying the /assets/ folder across...
504
+
Copying the /webfonts/ folder across...
505
+
Minification Complete!
506
+
```
368
507
369
508
## Contributing
370
509
@@ -380,18 +519,14 @@ We use [Semantic Versioning][semver] for software versions of this project. For
380
519
381
520
## Change-Log
382
521
383
-
View the [`CHANGELOG.md`][changelog] file for a detailed list of changes, along with specific tasks completed for each version released to date.
522
+
View the [CHANGELOG.md][changelog] file for a detailed list of changes, along with specific tasks completed for each version released to date.
384
523
385
524
## Authors
386
525
387
526
* Justin Hartman - [@justinhartman][author-1]
388
527
389
528
Also see the list of [contributors][contribs] who have participated in this project.
390
529
391
-
## TODO
392
-
393
-
A detailed list of TODO items can be found [over here][todo].
394
-
395
530
## License
396
531
397
532
This work is licensed under the [GNU Affero General Public License][agpl]. You can view the full LICENSE by [reading this][license] file.
@@ -418,7 +553,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
418
553
Thanks go out to the following for the inspiration, images, icons and, in some cases, the code to back this project up.
419
554
420
555
*[Computer SVG][vector] by Kameleon - License [CC BY 3.0][ccby30].
421
-
* Icons by [Font Awesome][fontawesome] - License [CC BY 4.0][ccby40].
556
+
* Icons by [Font Awesome][fontawesome] - Read [License here][fa-license].
422
557
*[html-minifier][html-min] - for compressing the `/src/*.html` files into the `/dist/*.html` folder. License: [MIT][mit].
423
558
*[PostCSS][postcss] - for compressing the `/src/css/` css files into the `/dist/css/` folder. License: [MIT][mit].
424
559
*[@maicong/ErrorPages][maicong] - for the terminal/console output code. License: [MIT][mit].
@@ -437,12 +572,12 @@ Thanks go out to the following for the inspiration, images, icons and, in some c
0 commit comments