-
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
/etc/nginx/conf.d/default.conf should be named 50-default.conf to help config file ordering #2593
Comments
I assumed that adding |
Hi @p12tic Sorry if adding the tag was misleading, that's just to help me categorize issues. I agree the generated config file being named default.conf does not help with config ordering, but that was not a random choice : that's the name of the default config that's already inside the base nginx images.
So if we generate the template to another file (say That's not something we want, and this could be fixed by removing this file from the image, but that would cause another issue: people expect the config to be generated at If we're going to change that, even if the reasons are sound, the change should be optional at first. Then if we choose to make it default, it should still be possible to fallback to the previous behaviour. |
Thanks a lot for an explanation. Things are always more complicated than they seem from the first sight. Renaming is clearly not an option given the additional complexity. I guess a note about config file ordering in the documentation would be enough. |
Currently nginx-proxy puts its configuration into a file named default.conf which is included via
include /etc/nginx/conf.d/*.conf;
directive. The nginx configuration is order dependent, thus if users rely on anything in default.conf being ordered before or after their config file, they must choose the name for the config file accordingly. Currently the name must be something that comes either before or afterdefault.conf
in alphabetical order. This is confusing.A simple fix for this would be to rename the generated config file from default.conf to have some number prepended, such as 50-default.conf.
Please let me know if this issue is something for which a PR would be accepted. I would then go prepare one.
The text was updated successfully, but these errors were encountered: