mirror of
https://github.com/thib8956/nginx-proxy
synced 2025-06-30 22:05:46 +00:00
feat: custom default error page (#2430)
* feat: customizable error page * fix: use regex on catchall root location to fix DEFAULT_ROOT=none test * docs: custom error pages * fix: don't use default nginx image error page * docs: small fix
This commit is contained in:
12
nginx.tmpl
12
nginx.tmpl
@ -702,7 +702,17 @@ server {
|
||||
return 444;
|
||||
}
|
||||
{{- end }}
|
||||
return 503;
|
||||
|
||||
{{- if (exists "/usr/share/nginx/html/errors/50x.html") }}
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location /50x.html {
|
||||
root /usr/share/nginx/html/errors;
|
||||
internal;
|
||||
}
|
||||
{{- end }}
|
||||
location ^~ / {
|
||||
return 503;
|
||||
}
|
||||
}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
Reference in New Issue
Block a user