2018-04-27 00:09:55 +00:00
2019-03-02 18:14:04 +00:00
<!doctype html>
2018-04-27 00:09:55 +00:00
< html lang = "en" class = "no-js" >
< head >
< meta charset = "utf-8" >
< meta name = "viewport" content = "width=device-width,initial-scale=1" >
2019-11-08 14:46:32 +00:00
< link rel = "canonical" href = "https://kubernetes.github.io/ingress-nginx/examples/customization/custom-errors/" >
2018-04-27 00:09:55 +00:00
2018-09-13 23:54:10 +00:00
< link rel = "shortcut icon" href = "../../../assets/images/favicon.png" >
2020-04-15 17:09:38 +00:00
< meta name = "generator" content = "mkdocs-1.1, mkdocs-material-5.1.0" >
2018-04-27 00:09:55 +00:00
< title > Custom Errors - NGINX Ingress Controller< / title >
2020-04-15 17:09:38 +00:00
< link rel = "stylesheet" href = "../../../assets/stylesheets/main.89dc9fe3.min.css" >
2018-04-27 00:09:55 +00:00
2020-04-15 17:09:38 +00:00
< link rel = "stylesheet" href = "../../../assets/stylesheets/palette.ecd4686e.min.css" >
2018-04-27 00:09:55 +00:00
2018-07-13 23:53:25 +00:00
< meta name = "theme-color" content = "#009688" >
2018-04-27 00:09:55 +00:00
2018-09-13 23:54:10 +00:00
< link href = "https://fonts.gstatic.com" rel = "preconnect" crossorigin >
2020-02-09 23:53:05 +00:00
< link rel = "stylesheet" href = "https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono&display=fallback" >
2020-04-15 17:09:38 +00:00
< style > body , input { font-family : "Roboto" , - apple-system , BlinkMacSystemFont , Helvetica , Arial , sans-serif } code , kbd , pre { font-family : "Roboto Mono" , SFMono-Regular , Consolas , Menlo , monospace } < / style >
2018-04-27 00:09:55 +00:00
2018-12-04 15:07:57 +00:00
2018-09-13 23:54:10 +00:00
< link rel = "stylesheet" href = "../../../extra.css" >
2018-04-27 12:02:43 +00:00
2018-04-27 00:09:55 +00:00
2019-03-02 18:14:04 +00:00
2020-04-15 17:09:38 +00:00
< link rel = "preconnect dns-prefetch" href = "https://www.google-analytics.com" >
< script > window . ga = window . ga || function ( ) { ( ga . q = ga . q || [ ] ) . push ( arguments ) } , ga . l = + new Date , ga ( "create" , "UA-118407822-1" , "kubernetes.github.io" ) , ga ( "set" , "anonymizeIp" , ! 0 ) , ga ( "send" , "pageview" ) , document . addEventListener ( "DOMContentLoaded" , function ( ) { document . forms . search && document . forms . search . query . addEventListener ( "blur" , function ( ) { if ( this . value ) { var e = document . location . pathname ; ga ( "send" , "pageview" , e + "?q=" + this . value ) } } ) } ) , document . addEventListener ( "DOMContentSwitch" , function ( ) { ga ( "send" , "pageview" ) } ) < / script >
2019-03-02 18:14:04 +00:00
< script async src = "https://www.google-analytics.com/analytics.js" > < / script >
2018-04-27 00:09:55 +00:00
< / head >
2020-04-15 17:09:38 +00:00
2018-04-27 00:09:55 +00:00
< body dir = "ltr" data-md-color-primary = "teal" data-md-color-accent = "green" >
2018-07-13 23:53:25 +00:00
< input class = "md-toggle" data-md-toggle = "drawer" type = "checkbox" id = "__drawer" autocomplete = "off" >
< input class = "md-toggle" data-md-toggle = "search" type = "checkbox" id = "__search" autocomplete = "off" >
2020-04-15 17:09:38 +00:00
< label class = "md-overlay" for = "__drawer" > < / label >
< div data-md-component = "skip" >
< a href = "#custom-errors" class = "md-skip" >
Skip to content
< / a >
< / div >
< div data-md-component = "announce" >
< / div >
2018-04-27 00:09:55 +00:00
< header class = "md-header" data-md-component = "header" >
2020-04-15 17:09:38 +00:00
< nav class = "md-header-nav md-grid" aria-label = "Header" >
< a href = "https://kubernetes.github.io/ingress-nginx" title = "NGINX Ingress Controller" class = "md-header-nav__button md-logo" aria-label = "NGINX Ingress Controller" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M12,8A3,3 0 0,0 15,5A3,3 0 0,0 12,2A3,3 0 0,0 9,5A3,3 0 0,0 12,8M12,11.54C9.64,9.35 6.5,8 3,8V19C6.5,19 9.64,20.35 12,22.54C14.36,20.35 17.5,19 21,19V8C17.5,8 14.36,9.35 12,11.54Z" / > < / svg >
< / a >
< label class = "md-header-nav__button md-icon" for = "__drawer" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z" / > < / svg >
< / label >
< div class = "md-header-nav__title" data-md-component = "header-title" >
< div class = "md-header-nav__ellipsis" >
< span class = "md-header-nav__topic md-ellipsis" >
NGINX Ingress Controller
< / span >
< span class = "md-header-nav__topic md-ellipsis" >
Custom Errors
< / span >
2018-04-27 00:09:55 +00:00
< / div >
2020-04-15 17:09:38 +00:00
< / div >
< label class = "md-header-nav__button md-icon" for = "__search" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z" / > < / svg >
< / label >
2018-04-27 00:09:55 +00:00
< div class = "md-search" data-md-component = "search" role = "dialog" >
2018-07-13 23:53:25 +00:00
< label class = "md-search__overlay" for = "__search" > < / label >
2018-04-27 00:09:55 +00:00
< div class = "md-search__inner" role = "search" >
< form class = "md-search__form" name = "search" >
2020-04-15 17:09:38 +00:00
< input type = "text" class = "md-search__input" name = "query" aria-label = "Search" placeholder = "Search" autocapitalize = "off" autocorrect = "off" autocomplete = "off" spellcheck = "false" data-md-component = "search-query" data-md-state = "active" >
< label class = "md-search__icon md-icon" for = "__search" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z" / > < / svg >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" / > < / svg >
< / label >
< button type = "reset" class = "md-search__icon md-icon" aria-label = "Clear" data-md-component = "search-reset" tabindex = "-1" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" / > < / svg >
2018-04-27 00:09:55 +00:00
< / button >
< / form >
< div class = "md-search__output" >
< div class = "md-search__scrollwrap" data-md-scrollfix >
2020-04-15 17:09:38 +00:00
< div class = "md-search-result" data-md-component = "search-result" >
2018-04-27 00:09:55 +00:00
< div class = "md-search-result__meta" >
Type to start searching
< / div >
< ol class = "md-search-result__list" > < / ol >
< / div >
< / div >
< / div >
< / div >
< / div >
2020-04-15 17:09:38 +00:00
< div class = "md-header-nav__source" >
2018-04-27 00:09:55 +00:00
2020-04-15 17:09:38 +00:00
< a href = "https://github.com/kubernetes/ingress-nginx/" title = "Go to repository" class = "md-source" >
< div class = "md-source__icon md-icon" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 448 512" > < path d = "M439.55 236.05L244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z" / > < / svg >
< / div >
2019-03-02 18:14:04 +00:00
< div class = "md-source__repository" >
kubernetes/ingress-nginx
< / div >
< / a >
2020-04-15 17:09:38 +00:00
< / div >
2018-04-27 00:09:55 +00:00
< / nav >
< / header >
2020-04-15 17:09:38 +00:00
< div class = "md-container" data-md-component = "container" >
2018-04-27 00:09:55 +00:00
2020-04-15 17:09:38 +00:00
2018-04-27 00:09:55 +00:00
2020-04-15 17:09:38 +00:00
< nav class = "md-tabs md-tabs--active" aria-label = "Tabs" data-md-component = "tabs" >
2018-04-27 00:09:55 +00:00
< div class = "md-tabs__inner md-grid" >
< ul class = "md-tabs__list" >
2018-09-13 23:54:10 +00:00
< li class = "md-tabs__item" >
2019-09-22 20:06:22 +00:00
< a href = "../../.." class = "md-tabs__link" >
2018-09-13 23:54:10 +00:00
Welcome
< / a >
< / li >
2018-04-27 00:09:55 +00:00
< li class = "md-tabs__item" >
2019-09-22 20:06:22 +00:00
< a href = "../../../deploy/" class = "md-tabs__link" >
2018-04-27 00:09:55 +00:00
Deployment
< / a >
< / li >
< li class = "md-tabs__item" >
2019-09-22 20:06:22 +00:00
< a href = "../../../user-guide/nginx-configuration/" class = "md-tabs__link" >
2018-04-27 00:09:55 +00:00
User guide
< / a >
< / li >
< li class = "md-tabs__item" >
2019-09-22 20:06:22 +00:00
< a href = "../../" class = "md-tabs__link md-tabs__link--active" >
2018-04-27 00:09:55 +00:00
Examples
< / a >
< / li >
< / ul >
< / div >
< / nav >
2020-04-15 17:09:38 +00:00
2018-04-27 00:09:55 +00:00
2020-04-15 17:09:38 +00:00
< main class = "md-main" data-md-component = "main" >
< div class = "md-main__inner md-grid" >
2018-04-27 00:09:55 +00:00
< div class = "md-sidebar md-sidebar--primary" data-md-component = "navigation" >
< div class = "md-sidebar__scrollwrap" >
< div class = "md-sidebar__inner" >
2020-04-15 17:09:38 +00:00
< nav class = "md-nav md-nav--primary" aria-label = "Navigation" data-md-level = "0" >
< label class = "md-nav__title" for = "__drawer" >
< a href = "https://kubernetes.github.io/ingress-nginx" title = "NGINX Ingress Controller" class = "md-nav__button md-logo" aria-label = "NGINX Ingress Controller" >
2018-04-27 00:09:55 +00:00
2020-04-15 17:09:38 +00:00
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M12,8A3,3 0 0,0 15,5A3,3 0 0,0 12,2A3,3 0 0,0 9,5A3,3 0 0,0 12,8M12,11.54C9.64,9.35 6.5,8 3,8V19C6.5,19 9.64,20.35 12,22.54C14.36,20.35 17.5,19 21,19V8C17.5,8 14.36,9.35 12,11.54Z" / > < / svg >
2018-08-04 22:29:33 +00:00
< / a >
2018-04-27 00:09:55 +00:00
NGINX Ingress Controller
< / label >
< div class = "md-nav__source" >
2020-04-15 17:09:38 +00:00
< a href = "https://github.com/kubernetes/ingress-nginx/" title = "Go to repository" class = "md-source" >
< div class = "md-source__icon md-icon" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 448 512" > < path d = "M439.55 236.05L244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z" / > < / svg >
< / div >
2019-03-02 18:14:04 +00:00
< div class = "md-source__repository" >
kubernetes/ingress-nginx
< / div >
< / a >
2018-04-27 00:09:55 +00:00
< / div >
< ul class = "md-nav__list" data-md-scrollfix >
2018-09-13 23:54:10 +00:00
< li class = "md-nav__item md-nav__item--nested" >
2020-04-15 17:09:38 +00:00
< input class = "md-nav__toggle md-toggle" data-md-toggle = "nav-1" type = "checkbox" id = "nav-1" >
2018-09-13 23:54:10 +00:00
< label class = "md-nav__link" for = "nav-1" >
Welcome
2020-04-15 17:09:38 +00:00
< span class = "md-nav__icon md-icon" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z" / > < / svg >
< / span >
2018-09-13 23:54:10 +00:00
< / label >
2020-04-15 17:09:38 +00:00
< nav class = "md-nav" aria-label = "Welcome" data-md-level = "1" >
2018-09-13 23:54:10 +00:00
< label class = "md-nav__title" for = "nav-1" >
2020-04-15 17:09:38 +00:00
< span class = "md-nav__icon md-icon" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" / > < / svg >
< / span >
2018-09-13 23:54:10 +00:00
Welcome
< / label >
< ul class = "md-nav__list" data-md-scrollfix >
2018-04-27 00:09:55 +00:00
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../.." title = "Welcome" class = "md-nav__link" >
2018-04-27 00:09:55 +00:00
Welcome
< / a >
< / li >
2018-09-13 23:54:10 +00:00
< li class = "md-nav__item" >
< a href = "../../../how-it-works/" title = "How it works" class = "md-nav__link" >
How it works
< / a >
< / li >
< li class = "md-nav__item" >
< a href = "../../../troubleshooting/" title = "Troubleshooting" class = "md-nav__link" >
Troubleshooting
< / a >
< / li >
2019-04-09 22:45:20 +00:00
< li class = "md-nav__item" >
< a href = "../../../kubectl-plugin/" title = "kubectl plugin" class = "md-nav__link" >
kubectl plugin
< / a >
< / li >
2018-09-13 23:54:10 +00:00
< li class = "md-nav__item" >
< a href = "../../../development/" title = "Development" class = "md-nav__link" >
Development
< / a >
< / li >
< / ul >
< / nav >
< / li >
2018-04-27 00:09:55 +00:00
< li class = "md-nav__item md-nav__item--nested" >
2020-04-15 17:09:38 +00:00
< input class = "md-nav__toggle md-toggle" data-md-toggle = "nav-2" type = "checkbox" id = "nav-2" >
2018-04-27 00:09:55 +00:00
< label class = "md-nav__link" for = "nav-2" >
Deployment
2020-04-15 17:09:38 +00:00
< span class = "md-nav__icon md-icon" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z" / > < / svg >
< / span >
2018-04-27 00:09:55 +00:00
< / label >
2020-04-15 17:09:38 +00:00
< nav class = "md-nav" aria-label = "Deployment" data-md-level = "1" >
2018-04-27 00:09:55 +00:00
< label class = "md-nav__title" for = "nav-2" >
2020-04-15 17:09:38 +00:00
< span class = "md-nav__icon md-icon" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" / > < / svg >
< / span >
2018-04-27 00:09:55 +00:00
Deployment
< / label >
< ul class = "md-nav__list" data-md-scrollfix >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../../deploy/" title = "Installation Guide" class = "md-nav__link" >
2018-04-27 00:09:55 +00:00
Installation Guide
< / a >
< / li >
2018-09-04 23:47:40 +00:00
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../../deploy/baremetal/" title = "Bare-metal considerations" class = "md-nav__link" >
2018-09-04 23:47:40 +00:00
Bare-metal considerations
< / a >
< / li >
2018-04-27 00:09:55 +00:00
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../../deploy/rbac/" title = "Role Based Access Control (RBAC)" class = "md-nav__link" >
2018-04-27 00:09:55 +00:00
Role Based Access Control (RBAC)
< / a >
< / li >
2018-05-03 14:08:21 +00:00
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../../deploy/upgrade/" title = "Upgrade" class = "md-nav__link" >
Upgrade
2018-05-03 14:08:21 +00:00
< / a >
< / li >
2018-04-27 00:09:55 +00:00
< / ul >
< / nav >
< / li >
< li class = "md-nav__item md-nav__item--nested" >
2020-04-15 17:09:38 +00:00
< input class = "md-nav__toggle md-toggle" data-md-toggle = "nav-3" type = "checkbox" id = "nav-3" >
2018-04-27 00:09:55 +00:00
< label class = "md-nav__link" for = "nav-3" >
User guide
2020-04-15 17:09:38 +00:00
< span class = "md-nav__icon md-icon" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z" / > < / svg >
< / span >
2018-04-27 00:09:55 +00:00
< / label >
2020-04-15 17:09:38 +00:00
< nav class = "md-nav" aria-label = "User guide" data-md-level = "1" >
2018-04-27 00:09:55 +00:00
< label class = "md-nav__title" for = "nav-3" >
2020-04-15 17:09:38 +00:00
< span class = "md-nav__icon md-icon" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" / > < / svg >
< / span >
2018-04-27 00:09:55 +00:00
User guide
< / label >
< ul class = "md-nav__list" data-md-scrollfix >
< li class = "md-nav__item md-nav__item--nested" >
2020-04-15 17:09:38 +00:00
< input class = "md-nav__toggle md-toggle" data-md-toggle = "nav-3-1" type = "checkbox" id = "nav-3-1" >
2018-04-27 00:09:55 +00:00
< label class = "md-nav__link" for = "nav-3-1" >
NGINX Configuration
2020-04-15 17:09:38 +00:00
< span class = "md-nav__icon md-icon" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z" / > < / svg >
< / span >
2018-04-27 00:09:55 +00:00
< / label >
2020-04-15 17:09:38 +00:00
< nav class = "md-nav" aria-label = "NGINX Configuration" data-md-level = "2" >
2018-04-27 00:09:55 +00:00
< label class = "md-nav__title" for = "nav-3-1" >
2020-04-15 17:09:38 +00:00
< span class = "md-nav__icon md-icon" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" / > < / svg >
< / span >
2018-04-27 00:09:55 +00:00
NGINX Configuration
< / label >
< ul class = "md-nav__list" data-md-scrollfix >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../../user-guide/nginx-configuration/" title = "Introduction" class = "md-nav__link" >
Introduction
2018-04-27 00:09:55 +00:00
< / a >
< / li >
2019-03-08 00:36:59 +00:00
< li class = "md-nav__item" >
< a href = "../../../user-guide/basic-usage/" title = "Basic usage" class = "md-nav__link" >
Basic usage
< / a >
< / li >
2018-04-27 00:09:55 +00:00
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../../user-guide/nginx-configuration/annotations/" title = "Annotations" class = "md-nav__link" >
2018-04-27 00:09:55 +00:00
Annotations
< / a >
< / li >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../../user-guide/nginx-configuration/configmap/" title = "ConfigMap" class = "md-nav__link" >
ConfigMap
2018-04-27 00:09:55 +00:00
< / a >
< / li >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../../user-guide/nginx-configuration/custom-template/" title = "Custom NGINX template" class = "md-nav__link" >
2018-04-27 00:09:55 +00:00
Custom NGINX template
< / a >
< / li >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../../user-guide/nginx-configuration/log-format/" title = "Log format" class = "md-nav__link" >
2018-04-27 00:09:55 +00:00
Log format
< / a >
< / li >
< / ul >
< / nav >
< / li >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../../user-guide/cli-arguments/" title = "Command line arguments" class = "md-nav__link" >
2018-04-27 00:09:55 +00:00
Command line arguments
< / a >
< / li >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../../user-guide/custom-errors/" title = "Custom errors" class = "md-nav__link" >
2018-04-27 00:09:55 +00:00
Custom errors
< / a >
< / li >
2018-05-03 14:08:21 +00:00
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../../user-guide/default-backend/" title = "Default backend" class = "md-nav__link" >
2018-05-03 14:08:21 +00:00
Default backend
< / a >
< / li >
2018-11-22 02:35:18 +00:00
< li class = "md-nav__item" >
< a href = "../../../user-guide/exposing-tcp-udp-services/" title = "Exposing TCP and UDP services" class = "md-nav__link" >
Exposing TCP and UDP services
< / a >
< / li >
2019-08-01 23:58:36 +00:00
< li class = "md-nav__item" >
< a href = "../../../user-guide/fcgi-services/" title = "Exposing FCGI services" class = "md-nav__link" >
Exposing FCGI services
< / a >
< / li >
2018-04-27 00:09:55 +00:00
< li class = "md-nav__item" >
2018-10-12 01:21:45 +00:00
< a href = "../../../user-guide/ingress-path-matching/" title = "Regular expressions in paths" class = "md-nav__link" >
Regular expressions in paths
2018-04-27 00:09:55 +00:00
< / a >
< / li >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../../user-guide/external-articles/" title = "External Articles" class = "md-nav__link" >
2018-04-27 00:09:55 +00:00
External Articles
< / a >
< / li >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../../user-guide/miscellaneous/" title = "Miscellaneous" class = "md-nav__link" >
2018-04-27 00:09:55 +00:00
Miscellaneous
< / a >
< / li >
2018-08-22 19:35:46 +00:00
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../../user-guide/monitoring/" title = "Prometheus and Grafana installation" class = "md-nav__link" >
2018-08-22 19:35:46 +00:00
Prometheus and Grafana installation
< / a >
< / li >
2018-04-27 00:09:55 +00:00
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../../user-guide/multiple-ingress/" title = "Multiple Ingress controllers" class = "md-nav__link" >
2018-05-03 14:08:21 +00:00
Multiple Ingress controllers
2018-04-27 00:09:55 +00:00
< / a >
< / li >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../../user-guide/tls/" title = "TLS/HTTPS" class = "md-nav__link" >
2018-05-03 14:08:21 +00:00
TLS/HTTPS
2018-04-27 00:09:55 +00:00
< / a >
< / li >
< li class = "md-nav__item md-nav__item--nested" >
2020-04-15 17:09:38 +00:00
< input class = "md-nav__toggle md-toggle" data-md-toggle = "nav-3-13" type = "checkbox" id = "nav-3-13" >
2018-04-27 00:09:55 +00:00
2019-08-01 23:58:36 +00:00
< label class = "md-nav__link" for = "nav-3-13" >
2018-04-27 00:09:55 +00:00
Third party addons
2020-04-15 17:09:38 +00:00
< span class = "md-nav__icon md-icon" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z" / > < / svg >
< / span >
2018-04-27 00:09:55 +00:00
< / label >
2020-04-15 17:09:38 +00:00
< nav class = "md-nav" aria-label = "Third party addons" data-md-level = "2" >
2019-08-01 23:58:36 +00:00
< label class = "md-nav__title" for = "nav-3-13" >
2020-04-15 17:09:38 +00:00
< span class = "md-nav__icon md-icon" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" / > < / svg >
< / span >
2018-04-27 00:09:55 +00:00
Third party addons
< / label >
< ul class = "md-nav__list" data-md-scrollfix >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../../user-guide/third-party-addons/modsecurity/" title = "ModSecurity Web Application Firewall" class = "md-nav__link" >
2018-04-27 00:09:55 +00:00
ModSecurity Web Application Firewall
< / a >
< / li >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../../user-guide/third-party-addons/opentracing/" title = "OpenTracing" class = "md-nav__link" >
2018-04-27 00:09:55 +00:00
OpenTracing
< / a >
< / li >
< / ul >
< / nav >
< / li >
< / ul >
< / nav >
< / li >
< li class = "md-nav__item md-nav__item--active md-nav__item--nested" >
2020-04-15 17:09:38 +00:00
< input class = "md-nav__toggle md-toggle" data-md-toggle = "nav-4" type = "checkbox" id = "nav-4" checked >
2018-04-27 00:09:55 +00:00
< label class = "md-nav__link" for = "nav-4" >
Examples
2020-04-15 17:09:38 +00:00
< span class = "md-nav__icon md-icon" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z" / > < / svg >
< / span >
2018-04-27 00:09:55 +00:00
< / label >
2020-04-15 17:09:38 +00:00
< nav class = "md-nav" aria-label = "Examples" data-md-level = "1" >
2018-04-27 00:09:55 +00:00
< label class = "md-nav__title" for = "nav-4" >
2020-04-15 17:09:38 +00:00
< span class = "md-nav__icon md-icon" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" / > < / svg >
< / span >
2018-04-27 00:09:55 +00:00
Examples
< / label >
< ul class = "md-nav__list" data-md-scrollfix >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../" title = "Introduction" class = "md-nav__link" >
Introduction
2018-04-27 00:09:55 +00:00
< / a >
< / li >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../PREREQUISITES/" title = "Prerequisites" class = "md-nav__link" >
2018-05-03 14:08:21 +00:00
Prerequisites
2018-04-27 00:09:55 +00:00
< / a >
< / li >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../affinity/cookie/" title = "Sticky Sessions" class = "md-nav__link" >
Sticky Sessions
2018-04-27 00:09:55 +00:00
< / a >
< / li >
< li class = "md-nav__item md-nav__item--nested" >
2020-04-15 17:09:38 +00:00
< input class = "md-nav__toggle md-toggle" data-md-toggle = "nav-4-4" type = "checkbox" id = "nav-4-4" >
2018-04-27 00:09:55 +00:00
< label class = "md-nav__link" for = "nav-4-4" >
Auth
2020-04-15 17:09:38 +00:00
< span class = "md-nav__icon md-icon" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z" / > < / svg >
< / span >
2018-04-27 00:09:55 +00:00
< / label >
2020-04-15 17:09:38 +00:00
< nav class = "md-nav" aria-label = "Auth" data-md-level = "2" >
2018-04-27 00:09:55 +00:00
< label class = "md-nav__title" for = "nav-4-4" >
2020-04-15 17:09:38 +00:00
< span class = "md-nav__icon md-icon" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" / > < / svg >
< / span >
2018-04-27 00:09:55 +00:00
Auth
< / label >
< ul class = "md-nav__list" data-md-scrollfix >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../auth/basic/" title = "Basic Authentication" class = "md-nav__link" >
2018-04-27 00:09:55 +00:00
Basic Authentication
< / a >
< / li >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../auth/client-certs/" title = "Client Certificate Authentication" class = "md-nav__link" >
2018-04-27 00:09:55 +00:00
Client Certificate Authentication
< / a >
< / li >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../auth/external-auth/" title = "External Basic Authentication" class = "md-nav__link" >
2018-08-30 19:50:29 +00:00
External Basic Authentication
2018-04-27 00:09:55 +00:00
< / a >
< / li >
2018-05-03 14:08:21 +00:00
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../auth/oauth-external-auth/" title = "External OAUTH Authentication" class = "md-nav__link" >
2018-08-30 19:50:29 +00:00
External OAUTH Authentication
2018-05-03 14:08:21 +00:00
< / a >
< / li >
2018-04-27 00:09:55 +00:00
< / ul >
< / nav >
< / li >
< li class = "md-nav__item md-nav__item--active md-nav__item--nested" >
2020-04-15 17:09:38 +00:00
< input class = "md-nav__toggle md-toggle" data-md-toggle = "nav-4-5" type = "checkbox" id = "nav-4-5" checked >
2018-04-27 00:09:55 +00:00
< label class = "md-nav__link" for = "nav-4-5" >
Customization
2020-04-15 17:09:38 +00:00
< span class = "md-nav__icon md-icon" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z" / > < / svg >
< / span >
2018-04-27 00:09:55 +00:00
< / label >
2020-04-15 17:09:38 +00:00
< nav class = "md-nav" aria-label = "Customization" data-md-level = "2" >
2018-04-27 00:09:55 +00:00
< label class = "md-nav__title" for = "nav-4-5" >
2020-04-15 17:09:38 +00:00
< span class = "md-nav__icon md-icon" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" / > < / svg >
< / span >
2018-04-27 00:09:55 +00:00
Customization
< / label >
< ul class = "md-nav__list" data-md-scrollfix >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../configuration-snippets/" title = "Configuration Snippets" class = "md-nav__link" >
2018-04-27 00:09:55 +00:00
Configuration Snippets
< / a >
< / li >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../custom-configuration/" title = "Custom Configuration" class = "md-nav__link" >
2018-04-27 00:09:55 +00:00
Custom Configuration
< / a >
< / li >
< li class = "md-nav__item md-nav__item--active" >
2020-04-15 17:09:38 +00:00
< input class = "md-nav__toggle md-toggle" data-md-toggle = "toc" type = "checkbox" id = "__toc" >
2018-04-27 00:09:55 +00:00
2018-07-13 23:53:25 +00:00
< label class = "md-nav__link md-nav__link--active" for = "__toc" >
2018-06-12 23:26:21 +00:00
Custom Errors
2020-04-15 17:09:38 +00:00
< span class = "md-nav__icon md-icon" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M3,9H17V7H3V9M3,13H17V11H3V13M3,17H17V15H3V17M19,17H21V15H19V17M19,7V9H21V7H19M19,13H21V11H19V13Z" / > < / svg >
< / span >
2018-06-12 23:26:21 +00:00
< / label >
2018-04-27 00:09:55 +00:00
< a href = "./" title = "Custom Errors" class = "md-nav__link md-nav__link--active" >
Custom Errors
< / a >
2018-06-12 23:26:21 +00:00
2020-04-15 17:09:38 +00:00
< nav class = "md-nav md-nav--secondary" aria-label = "Table of contents" >
2018-06-12 23:26:21 +00:00
2020-04-15 17:09:38 +00:00
< label class = "md-nav__title" for = "__toc" >
< span class = "md-nav__icon md-icon" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" / > < / svg >
< / span >
Table of contents
< / label >
2018-06-12 23:26:21 +00:00
< ul class = "md-nav__list" data-md-scrollfix >
< li class = "md-nav__item" >
2019-09-22 20:06:22 +00:00
< a href = "#customized-default-backend" class = "md-nav__link" >
2018-06-12 23:26:21 +00:00
Customized default backend
< / a >
< / li >
< li class = "md-nav__item" >
2019-09-22 20:06:22 +00:00
< a href = "#ingress-controller-configuration" class = "md-nav__link" >
2018-06-12 23:26:21 +00:00
Ingress controller configuration
< / a >
< / li >
< li class = "md-nav__item" >
2019-09-22 20:06:22 +00:00
< a href = "#testing-error-pages" class = "md-nav__link" >
2018-06-12 23:26:21 +00:00
Testing error pages
< / a >
< / li >
< / ul >
< / nav >
2018-04-27 00:09:55 +00:00
< / li >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../custom-headers/" title = "Custom Headers" class = "md-nav__link" >
2018-04-27 00:09:55 +00:00
Custom Headers
< / a >
< / li >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../external-auth-headers/" title = "External authentication" class = "md-nav__link" >
External authentication
2018-04-27 00:09:55 +00:00
< / a >
< / li >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../ssl-dh-param/" title = "Custom DH parameters for perfect forward secrecy" class = "md-nav__link" >
2018-05-03 14:08:21 +00:00
Custom DH parameters for perfect forward secrecy
2018-04-27 00:09:55 +00:00
< / a >
< / li >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../sysctl/" title = "Sysctl tuning" class = "md-nav__link" >
2018-04-27 00:09:55 +00:00
Sysctl tuning
< / a >
< / li >
< / ul >
< / nav >
< / li >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../docker-registry/" title = "Docker registry" class = "md-nav__link" >
2018-04-27 00:09:55 +00:00
Docker registry
< / a >
< / li >
2018-05-12 01:26:30 +00:00
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../grpc/" title = "gRPC" class = "md-nav__link" >
2018-05-12 01:26:30 +00:00
gRPC
< / a >
< / li >
2018-04-27 00:09:55 +00:00
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../multi-tls/" title = "Multi TLS certificate termination" class = "md-nav__link" >
2018-04-27 00:09:55 +00:00
Multi TLS certificate termination
< / a >
< / li >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../rewrite/" title = "Rewrite" class = "md-nav__link" >
2018-04-27 00:09:55 +00:00
Rewrite
< / a >
< / li >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../static-ip/" title = "Static IPs" class = "md-nav__link" >
2018-04-27 00:09:55 +00:00
Static IPs
< / a >
< / li >
< li class = "md-nav__item" >
2018-09-13 23:54:10 +00:00
< a href = "../../tls-termination/" title = "TLS termination" class = "md-nav__link" >
2018-04-27 00:09:55 +00:00
TLS termination
< / a >
< / li >
2019-08-01 23:58:36 +00:00
< li class = "md-nav__item" >
< a href = "../../psp/" title = "Pod Security Policy (PSP)" class = "md-nav__link" >
Pod Security Policy (PSP)
< / a >
< / li >
2018-04-27 00:09:55 +00:00
< / ul >
< / nav >
< / li >
< / ul >
< / nav >
< / div >
< / div >
< / div >
< div class = "md-sidebar md-sidebar--secondary" data-md-component = "toc" >
< div class = "md-sidebar__scrollwrap" >
< div class = "md-sidebar__inner" >
2020-04-15 17:09:38 +00:00
< nav class = "md-nav md-nav--secondary" aria-label = "Table of contents" >
2018-04-27 00:09:55 +00:00
2020-04-15 17:09:38 +00:00
< label class = "md-nav__title" for = "__toc" >
< span class = "md-nav__icon md-icon" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" / > < / svg >
< / span >
Table of contents
< / label >
2018-06-12 23:26:21 +00:00
< ul class = "md-nav__list" data-md-scrollfix >
< li class = "md-nav__item" >
2019-09-22 20:06:22 +00:00
< a href = "#customized-default-backend" class = "md-nav__link" >
2018-06-12 23:26:21 +00:00
Customized default backend
< / a >
< / li >
< li class = "md-nav__item" >
2019-09-22 20:06:22 +00:00
< a href = "#ingress-controller-configuration" class = "md-nav__link" >
2018-06-12 23:26:21 +00:00
Ingress controller configuration
< / a >
< / li >
< li class = "md-nav__item" >
2019-09-22 20:06:22 +00:00
< a href = "#testing-error-pages" class = "md-nav__link" >
2018-06-12 23:26:21 +00:00
Testing error pages
< / a >
< / li >
< / ul >
2018-04-27 00:09:55 +00:00
< / nav >
< / div >
< / div >
< / div >
< div class = "md-content" >
< article class = "md-content__inner md-typeset" >
2020-04-15 17:09:38 +00:00
< a href = "https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/customization/custom-errors/README.md" title = "Edit this page" class = "md-content__button md-icon" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z" / > < / svg >
< / a >
2018-04-27 00:09:55 +00:00
2019-11-08 19:24:34 +00:00
< h1 id = "custom-errors" > Custom Errors< a class = "headerlink" href = "#custom-errors" title = "Permanent link" > ¶< / a > < / h1 >
2018-06-12 23:26:21 +00:00
< p > This example demonstrates how to use a custom backend to render custom error pages.< / p >
2019-11-08 19:24:34 +00:00
< h2 id = "customized-default-backend" > Customized default backend< a class = "headerlink" href = "#customized-default-backend" title = "Permanent link" > ¶< / a > < / h2 >
2020-04-15 17:09:38 +00:00
< p > First, create the custom < code > default-backend< / code > . It will be used by the Ingress controller later on.< / p >
< div class = "highlight" > < pre > < span > < / span > < code > $ kubectl create -f custom-default-backend.yaml
service " nginx-errors" created
deployment.apps " nginx-errors" created
2020-02-09 23:53:05 +00:00
< / code > < / pre > < / div >
2018-04-27 00:09:55 +00:00
2020-04-15 17:09:38 +00:00
< p > This should have created a Deployment and a Service with the name < code > nginx-errors< / code > .< / p >
< div class = "highlight" > < pre > < span > < / span > < code > $ kubectl get deploy,svc
2018-06-12 23:26:21 +00:00
NAME DESIRED CURRENT READY AGE
2020-04-15 17:09:38 +00:00
deployment.apps/nginx-errors 1 1 1 10s
2018-04-27 00:09:55 +00:00
2020-04-15 17:09:38 +00:00
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/nginx-errors ClusterIP 10.0.0.12 < none> 80/TCP 10s
2020-02-09 23:53:05 +00:00
< / code > < / pre > < / div >
2018-04-27 00:09:55 +00:00
2019-11-08 19:24:34 +00:00
< h2 id = "ingress-controller-configuration" > Ingress controller configuration< a class = "headerlink" href = "#ingress-controller-configuration" title = "Permanent link" > ¶< / a > < / h2 >
2018-10-07 19:44:09 +00:00
< p > If you do not already have an instance of the NGINX Ingress controller running, deploy it according to the
2018-09-13 23:54:10 +00:00
< a href = "../../../deploy/" > deployment guide< / a > , then follow these steps:< / p >
2018-06-12 23:26:21 +00:00
< ol >
< li >
2020-04-15 17:09:38 +00:00
< p > Edit the < code > nginx-ingress-controller< / code > Deployment and set the value of the < code > --default-backend-service< / code > flag to the name of the
2018-06-12 23:26:21 +00:00
newly created error backend.< / p >
< / li >
< li >
2020-04-15 17:09:38 +00:00
< p > Edit the < code > nginx-configuration< / code > ConfigMap and create the key < code > custom-http-errors< / code > with a value of < code > 404,503< / code > .< / p >
2018-06-12 23:26:21 +00:00
< / li >
< li >
< p > Take note of the IP address assigned to the NGINX Ingress controller Service.
2020-04-15 17:09:38 +00:00
< div class = "highlight" > < pre > < span > < / span > < code > $ kubectl get svc ingress-nginx
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
ingress-nginx ClusterIP 10.0.0.13 < none> 80/TCP,443/TCP 10m
2020-02-09 23:53:05 +00:00
< / code > < / pre > < / div > < / p >
2018-06-12 23:26:21 +00:00
< / li >
< / ol >
< div class = "admonition note" >
< p class = "admonition-title" > Note< / p >
2020-04-15 17:09:38 +00:00
< p > The < code > ingress-nginx< / code > Service is of type < code > ClusterIP< / code > in this example. This may vary depending on your environment.
2018-06-12 23:26:21 +00:00
Make sure you can use the Service to reach NGINX before proceeding with the rest of this example.< / p >
< / div >
2019-11-08 19:24:34 +00:00
< h2 id = "testing-error-pages" > Testing error pages< a class = "headerlink" href = "#testing-error-pages" title = "Permanent link" > ¶< / a > < / h2 >
2018-06-12 23:26:21 +00:00
< p > Let us send a couple of HTTP requests using cURL and validate everything is working as expected.< / p >
< p > A request to the default backend returns a 404 error with a custom message:< / p >
2020-04-15 17:09:38 +00:00
< div class = "highlight" > < pre > < span > < / span > < code > $ curl -D- http://10.0.0.13/
2018-06-12 23:26:21 +00:00
HTTP/1.1 404 Not Found
Server: nginx/1.13.12
Date: Tue, 12 Jun 2018 19:11:24 GMT
Content-Type: */*
Transfer-Encoding: chunked
Connection: keep-alive
2020-04-15 17:09:38 +00:00
< span> The page you' re looking for could not be found.< /span>
2020-02-09 23:53:05 +00:00
< / code > < / pre > < / div >
2018-04-27 00:09:55 +00:00
2020-04-15 17:09:38 +00:00
< p > A request with a custom < code > Accept< / code > header returns the corresponding document type (JSON):< / p >
< div class = "highlight" > < pre > < span > < / span > < code > $ curl -D- -H ' Accept: application/json' http://10.0.0.13/
HTTP/1.1 404 Not Found
2018-06-12 23:26:21 +00:00
Server: nginx/1.13.12
2020-04-15 17:09:38 +00:00
Date: Tue, 12 Jun 2018 19:12:36 GMT
2018-06-12 23:26:21 +00:00
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
2018-04-27 00:09:55 +00:00
2020-04-15 17:09:38 +00:00
{ " message" : " The page you' re looking for could not be found" }
2020-02-09 23:53:05 +00:00
< / code > < / pre > < / div >
2018-06-12 23:26:21 +00:00
< p > To go further with this example, feel free to deploy your own applications and Ingress objects, and validate that the
responses are still in the correct format when a backend returns 503 (eg. if you scale a Deployment down to 0 replica).< / p >
2018-04-27 00:09:55 +00:00
< / article >
< / div >
< / div >
< / main >
< footer class = "md-footer" >
< div class = "md-footer-nav" >
2020-04-15 17:09:38 +00:00
< nav class = "md-footer-nav__inner md-grid" aria-label = "Footer" >
2018-04-27 00:09:55 +00:00
2020-04-15 17:09:38 +00:00
< a href = "../custom-configuration/" title = "Custom Configuration" class = "md-footer-nav__link md-footer-nav__link--prev" rel = "prev" >
< div class = "md-footer-nav__button md-icon" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" / > < / svg >
2018-04-27 00:09:55 +00:00
< / div >
2020-04-15 17:09:38 +00:00
< div class = "md-footer-nav__title" >
< div class = "md-ellipsis" >
2018-04-27 00:09:55 +00:00
< span class = "md-footer-nav__direction" >
Previous
< / span >
Custom Configuration
2020-04-15 17:09:38 +00:00
< / div >
2018-04-27 00:09:55 +00:00
< / div >
< / a >
2020-04-15 17:09:38 +00:00
< a href = "../custom-headers/" title = "Custom Headers" class = "md-footer-nav__link md-footer-nav__link--next" rel = "next" >
< div class = "md-footer-nav__title" >
< div class = "md-ellipsis" >
2018-04-27 00:09:55 +00:00
< span class = "md-footer-nav__direction" >
Next
< / span >
Custom Headers
2020-04-15 17:09:38 +00:00
< / div >
2018-04-27 00:09:55 +00:00
< / div >
2020-04-15 17:09:38 +00:00
< div class = "md-footer-nav__button md-icon" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" > < path d = "M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z" / > < / svg >
2018-04-27 00:09:55 +00:00
< / div >
< / a >
< / nav >
< / div >
< div class = "md-footer-meta md-typeset" >
< div class = "md-footer-meta__inner md-grid" >
< div class = "md-footer-copyright" >
2020-04-15 17:09:38 +00:00
Made with
2020-02-09 23:53:05 +00:00
< a href = "https://squidfunk.github.io/mkdocs-material/" target = "_blank" rel = "noopener" >
2020-04-15 17:09:38 +00:00
Material for MkDocs
< / a >
2018-04-27 00:09:55 +00:00
< / div >
< / div >
< / div >
< / footer >
< / div >
2020-04-15 17:09:38 +00:00
< script src = "../../../assets/javascripts/vendor.36cbf620.min.js" > < / script >
< script src = "../../../assets/javascripts/bundle.00c583dd.min.js" > < / script > < script id = "__lang" type = "application/json" > { "clipboard.copy" : "Copy to clipboard" , "clipboard.copied" : "Copied to clipboard" , "search.config.lang" : "en" , "search.config.pipeline" : "trimmer, stopWordFilter" , "search.config.separator" : "[\\s\\-]+" , "search.result.placeholder" : "Type to start searching" , "search.result.none" : "No matching documents" , "search.result.one" : "1 matching document" , "search.result.other" : "# matching documents" } < / script >
< script >
app = initialize({
base: "../../..",
features: ["tabs", "instant"],
search: Object.assign({
worker: "../../../assets/javascripts/worker/search.7f7c8775.min.js"
}, typeof search !== "undefined" & & search)
})
< / script >
2018-04-27 00:09:55 +00:00
< / body >
< / html >