Giter Club home page Giter Club logo

ngx-catch-all-errors-page's Introduction

ngx-CATch-all-errors-page: HTTP Cats API powered error_page

Usage

General

Set up the Nginx error_page inside the server block and create a SSI enabled alias to the HTML file.

charset UTF-8;
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 420 421 422 423 424 425 426 429 431 444 450 451 497 498 500 501 502 503 504 506 507 508 509 510 511 521 522 523 525 599 /error_page.html;
error_page 428 449 =400;
error_page 505 =500;
recursive_error_pages on;

location = /error_page.html {
    # git clone https://github.com/R2-G2/ngx-CATch-all-errors-page.git /CUSTOM/PATH
    alias /CUSTOM/PATH/CATastrophe.html;
    ssi on;
}

Personal

Optinally define a custom location to load the images from a different (local) place than the HTTP Cats API itself, some sort of a title and a custom background color.

charset UTF-8;
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 420 421 422 423 424 425 426 429 431 444 450 451 497 498 500 501 502 503 504 506 507 508 509 510 511 521 522 523 525 599 /CATaclysm.html;
error_page 428 449 =400;
error_page 505 =500;
recursive_error_pages on;

location /CATacomb/ {
    # git clone https://github.com/httpcats/http.cat.git /opt/http.cat
    alias /opt/http.cat/public/images/;
}

location = /CATaclysm.html {
    # git clone https://github.com/R2-G2/ngx-CATch-all-errors-page.git /opt/ngx-CATch-all-errors-page
    alias /opt/ngx-CATch-all-errors-page/CATastrophe.html;
    ssi on;
    set $CATalog "/CATacomb";
    set $CATegory " $request_uri";
    set $CATlitter "#000";
}

Problems?

Fork! Fork it! Fork you! Fork me, right?

ngx-catch-all-errors-page's People

Contributors

r2-g2 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.