Skip to content

Commit b2bafe4

Browse files
committed
New templates, Moved non-Apache templates out of /src/, updated minify script.
1 parent 1b2ffbc commit b2bafe4

File tree

17 files changed

+317
-143
lines changed

17 files changed

+317
-143
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ docs/
77
# Node packages. Not sure if this even helps.
88
package.json
99
package-lock.json
10+
11+
# Third-party software
12+
html-minifier/

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
Below is a detailed change-log, along with specific tasks completed, for each version released to date for Apache Error Pages.
44

5+
## Version 1.1.0 (14/05/2018)
6+
7+
- [#new](#new)
8+
- New templates have been created as follows:
9+
- 520.html
10+
- 521.html
11+
- 533.html
12+
- [#enhancement](#enhancement)
13+
- Optimised the `minify` script to now compress the JavaScript contained in the file along with any CSS inputs.
14+
- Updated `README.md` to include all available HTTP error codes when modifying `httpd.conf`.
15+
- [#bugfix](#bugfix)
16+
- Removed the commit of `html-minifier` to the project. This would prevent users from cloning the repo in order to run the minification script.
17+
518
## Version 1.0.1 (14/05/2018)
619

720
- [#new](#new)
@@ -29,6 +42,5 @@ Grab everything you need from the `/dist/` folder. All other files support the c
2942
- Minify the HTML for all files in the `/src/` directory.
3043
- Minify the CSS for all the files in `/src/css/` directory.
3144
- Output the HTML and CSS to the `/dist/` folder.
32-
- [#bugfix](#bugfix)
3345

3446
[script]: src/scripts/minify

README.md

Lines changed: 105 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,75 @@
11
# Apache Error Pages Replacement
22

3-
The 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.
3+
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+
5+
<!-- @import "[TOC]" {cmd="toc" depthFrom=2 depthTo=6 orderedList=false} -->
6+
7+
<!-- code_chunk_output -->
8+
9+
* [Features](#features)
10+
* [Preview](#preview)
11+
* [Error Page Example](#error-page-example)
12+
* [Responsive Design](#responsive-design)
13+
* [Desktop](#desktop)
14+
* [Tablet](#tablet)
15+
* [Smartphone](#smartphone)
16+
* [Smartphone (older-generation)](#smartphone-older-generation)
17+
* [Installation](#installation)
18+
* [Copying the Error Pages](#copying-the-error-pages)
19+
* [Modifying your Apache Config file](#modifying-your-apache-config-file)
20+
* [Minification Setup](#minification-setup)
21+
* [Dependencies](#dependencies)
22+
* [Installing html-minifier](#installing-html-minifier)
23+
* [Installing postcss](#installing-postcss)
24+
* [Running the minify script](#running-the-minify-script)
25+
* [Contributing](#contributing)
26+
* [Code of Conduct](#code-of-conduct)
27+
* [Versioning](#versioning)
28+
* [Change-Log](#change-log)
29+
* [Authors](#authors)
30+
* [TODO](#todo)
31+
* [License](#license)
32+
* [Acknowledgements](#acknowledgements)
33+
34+
<!-- /code_chunk_output -->
35+
436
## Features
537

638
* Fully responsive templates, works across desktop, tablet and mobile phones.
739
* Animated text, creating the illusion of an error output on a Terminal console.
8-
* There are 24 templates covering all Apache 2 (as well as other webserver) error statuses. Enjoy!
9-
* Each template, as well as corresponding CSS file, has been minified for smallest file usage possible.
40+
* There are 27 templates, 20 exclusively for Apache with an additional 7 for other web-servers. Enjoy!
41+
* Each template, as well as all CSS files, have been minified to ensure the smallest file usage possible.
1042
* Font Awesome icons used in error messages.
1143

12-
Installation instructions are found below the previews. This shouldn't take you more than 5-10 minutes to implement these crafted, custom-designed Apache error pages.
44+
[Installation instructions](#installation) are found below the previews. This shouldn't take you more than **5 minutes** to implement these hand-crafted, custom-designed Apache error pages.
1345

1446
## Preview
1547

16-
### 404 Error Page
48+
### Error Page Example
1749

1850
![404 Error Page][404-template]
1951

52+
### Responsive Design
53+
54+
#### Desktop
55+
56+
![Desktop Version][preview1]
57+
58+
#### Tablet
59+
60+
![Tablet Version][preview2]
61+
62+
#### Smartphone
63+
64+
![iOS and Android Version][preview3]
65+
66+
#### Smartphone (older-generation)
67+
68+
![Older Generation Smartphone Version][preview4]
69+
2070
## Installation
2171

22-
Installing the drop-in replacement for Apache 2 error pages comes in two parts. You will need to copy all the files contained within the `/dist/` folder to a location on your server. Secondly, you will need to edit your `apache.conf` or `httpd.conf` file to link the error pages to your server.
72+
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.
2373

2474
### Copying the Error Pages
2575

@@ -30,7 +80,7 @@ Do not replace the default error pages with this project's files. Instead, insta
3080
```bash
3181
$ cd Apache-Error-Pages/
3282
$ cp -R dist/ /usr/local/var/www/error-pages
33-
$ chown -R www:apache /usr/local/var/www/error-pages # see note below.
83+
$ chown -R www:apache /usr/local/var/www/error-pages # see note below.
3484
```
3585

3686
**NB: _Ensure that you replace `www` and `apache`, in the `chown` command above, with your web-server's default user and group._**
@@ -190,10 +240,22 @@ ErrorDocument 400 /ErrorPages/400.html
190240
ErrorDocument 401 /ErrorPages/401.html
191241
ErrorDocument 403 /ErrorPages/403.html
192242
ErrorDocument 404 /ErrorPages/404.html
243+
ErrorDocument 405 /ErrorPages/405.html
244+
ErrorDocument 406 /ErrorPages/406.html
245+
ErrorDocument 407 /ErrorPages/407.html
246+
ErrorDocument 408 /ErrorPages/408.html
247+
ErrorDocument 411 /ErrorPages/411.html
248+
ErrorDocument 413 /ErrorPages/413.html
249+
ErrorDocument 414 /ErrorPages/414.html
250+
ErrorDocument 415 /ErrorPages/415.html
251+
ErrorDocument 429 /ErrorPages/429.html
252+
ErrorDocument 431 /ErrorPages/431.html
193253
ErrorDocument 500 /ErrorPages/500.html
194254
ErrorDocument 501 /ErrorPages/501.html
195255
ErrorDocument 502 /ErrorPages/502.html
196256
ErrorDocument 503 /ErrorPages/503.html
257+
ErrorDocument 504 /ErrorPages/504.html
258+
ErrorDocument 505 /ErrorPages/505.html
197259
```
198260

199261
Save your file and then test your configuration changes by executing the following.
@@ -202,7 +264,7 @@ Save your file and then test your configuration changes by executing the followi
202264
$ sudo apachectl configtest
203265
```
204266

205-
If you get any message other than `Syntax OK` then you've done something wrong. You will need to check your changes made to the conf files and see where you may have gone wrong.
267+
If you get any message other than `Syntax OK` then you've done something wrong. You will need to check your changes made to the `.conf` file and see where you may have gone wrong.
206268

207269
The final step is to restart Apache so that it loads your new error pages.
208270

@@ -220,21 +282,20 @@ There is a `bash` script, found at [/src/scripts/minify][script] which runs the
220282

221283
You will need to install both `html-minifier` as well as `postcss` before you can execute the minifaction script.
222284

223-
#### Installing `html-minifier`
285+
#### Installing html-minifier
224286

225287
The best way to install `html-minifier` is by running the following commands in the project root folder.
226288

227289
```bash
228290
$ cd Apache-Error-Pages/
229-
$ rm -Rf html-minifier/ # ensure you are using the latest version.
230291
$ git clone git://github.com/kangax/html-minifier.git
231292
$ cd html-minifier
232293
$ npm link .
233294
```
234295

235-
#### Installing `postcss`
296+
#### Installing postcss
236297

237-
Once `html-minifier` is installed you can install `postcss` as follows:
298+
Once `html-minifier` is installed you can install `postcss` as follows. Make sure that you are in the `/html-minifier/` folder when running the below commands (i.e. `$ cd html-minifier/`).
238299

239300
```bash
240301
$ npm install cssnano --save
@@ -248,6 +309,34 @@ You can run the script with this command:
248309
```bash
249310
$ cd src/
250311
$ ./scripts/minify
312+
313+
# expected output when executing `minify`:
314+
../dist folder reset
315+
400.html minified
316+
401.html minified
317+
403.html minified
318+
404.html minified
319+
405.html minified
320+
406.html minified
321+
407.html minified
322+
408.html minified
323+
411.html minified
324+
413.html minified
325+
414.html minified
326+
415.html minified
327+
429.html minified
328+
431.html minified
329+
500.html minified
330+
501.html minified
331+
502.html minified
332+
503.html minified
333+
504.html minified
334+
505.html minified
335+
breakpoints.css minified
336+
fontawesome-all.css minified
337+
google-fonts.css minified
338+
main.css minified
339+
Minification complete!
251340
```
252341

253342
There are no options for running this script. Executing this command will:
@@ -346,3 +435,7 @@ Thanks go out to the following for the inspiration, images, icons and, in some c
346435
[author-1]: https://github.com/justinhartman
347436
[.github]: https://github.com/justinhartman/.github
348437
[script]: src/scripts/minify
438+
[preview1]: https://ws3.sinaimg.cn/large/006tNc79gy1frbf2aw0v9j31kw0zk3zu.jpg
439+
[preview2]: https://ws3.sinaimg.cn/large/006tKfTcly1fraeyka1y6j31kw16o75d.jpg
440+
[preview3]: https://ws4.sinaimg.cn/large/006tKfTcly1fraeyf9bhzj30ku112gma.jpg
441+
[preview4]: https://ws4.sinaimg.cn/large/006tKfTcly1fraeye5bydj308w0dcdfw.jpg

dist/420.html

Lines changed: 0 additions & 31 deletions
This file was deleted.

dist/900.html

Lines changed: 0 additions & 31 deletions
This file was deleted.

dist/901.html

Lines changed: 0 additions & 31 deletions
This file was deleted.

dist/902.html

Lines changed: 0 additions & 31 deletions
This file was deleted.

html-minifier

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
4xx.json
2-
5xx.json
3-
other.json
1+
*.json
2+
*.md
File renamed without changes.

0 commit comments

Comments
 (0)