GithubHelp home page GithubHelp logo

anthrax3 / http-error-pages Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 179 KB

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.

License: GNU General Public License v3.0

Shell 39.99% HTML 47.66% CSS 12.35%

http-error-pages's Introduction

HTTP Static Error Pages Generator

Description

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.

Use example

Then an example of starting the tool:

./httpgen

The command result is located in the sites/ directory.

Error examples

404 Not Found

alt text

503 Service Unavailable

alt text

Temporary Maintenance

alt text

Rate Limit

alt text

Your own error pages

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 the code 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")

Contributing

See CONTRIBUTING.md.

Project architecture

|-- 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

License

GPLv3 : http://www.gnu.org/licenses/

Free software, Yeah!

http-error-pages's People

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.