A simple to use generator for static pages with errors to replace the default error pages that come with any web server like Nginx or Apache.
Then an example of starting the tool:
./httpgen
The command result is located in the sites/ directory.
If you would like to add your own static pages to generate, edit the src/other.json file and add to it:
{
"code" : "903",
"title": "HTTP Error Code",
"desc" : "This is a example http error code description.",
"icon" : "fas fa-info-circle blue"
}
Description:
code
- specifies the response status codes (eg. 400, 404, 501)title
- specifies the short title of status code, related to thecode
key (eg. "Not Found", "Bad Gateway")desc
- determines the possible reason for the error (eg. "The web server is currently undergoing some maintenance")icon
- sets a small icon from font-awesome for error code (eg. "fas fa-info-circle green", "fas fa-info-circle red")
See CONTRIBUTING.md.
|-- LICENSE.md # GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007
|-- README.md # this simple documentation
|-- CONTRIBUTING.md # principles of project support
|-- .gitignore # ignore untracked files
|-- httpgen # main script (init)
|-- sites # store generated static pages (default empty)
|-- src
|-- 4xx.json # data for 4xx errors
|-- 5xx.json # data for 5xx errors
|-- other.json # data for other (eg. rate-limit) errors
|-- main.css # main css file for all static pages
|-- templates
|-- _template.html # static page for all other errors (eg. 404, 500)
|-- nginx
|-- errors.conf # config file with error directives
|-- doc
|-- img # error examples
GPLv3 : http://www.gnu.org/licenses/
Free software, Yeah!