Skip to content

dvdblk/custom-default-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 - 404 status code

LIVE Preview - 403 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;
  }

  # ...
}