Skip to content

Latest commit

 

History

History
60 lines (47 loc) · 1.94 KB

README.md

File metadata and controls

60 lines (47 loc) · 1.94 KB

Custom Default Backend for NGINX Ingress Controller

Customize the default backend for an NGINX Ingress Controller on your kubernetes cluster. A single Docker image with an NGINX server that handles most status codes.

LIVE Preview for a 404 status code.

Installation via Helm

You can use the defaultBackend property of the ingress-nginx helm chart like this:

defaultBackend:
  enabled: true
  image:
    # Or your own forked one...
    repository: dvdblk/custom-default-backend
    tag: "latest"
    pullPolicy: Always
  port: 8080

HTML Customization

Fork this repository and edit the HTML inside the content/ directory if you want some CSS / text customization.

If you wish to have a different HTML error page per status code you can omit the ssi part and set up the error pages (e.g. content/404.html, content/500.html) like this:

# default.conf

server {
  # ...

  error_page 400 /404.html;
  location = /404.html {
    internal;
  }

  error_page 500 /500.html;
  location = /500.html {
    internal;
  }

  # ...
}