-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: custom default error page #2430
Conversation
internal; | ||
} | ||
{{- end }} | ||
location ^~ / { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case the user navigates to "example.com" or "www.example.com" he gets a 503, right?
If so: how to serve a custom root-Page without the need of a separate nginx serving just that root path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not certain I understand the question. 🤔
This server
block (the one which is modified) is a catch all for when you're requesting a hostname that does not exist on a particular instance of nginx-proxy (It's never used when real proxying takes place). The purpose of the PR is to allow customisation of the default error page you get when this happen.
The location
block is required because having only return 503
does not trigger the error_page
.
I'm not certain this PR should restore the nginx image's 50x page by default. This would switch from this, which have been there since the beginning : To this: That's arguably easier to the eye but that might not be what users want as default either. @Prime1Code any opinion on this ? |
Yes, I think so too. This error page should not be enabled by default. But the option to add one is still a better customization option than without it. |
* 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 PR allows to customise the default error page by mounting an HTML file to serve in its place.
Solve #1325