-
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
Support for custom server
directive using default_server
broken by 9b4bb07
#2212
Comments
@rhansen could you take a look at this ? |
@Enchiridion I suspect you're using a method to get a default virtual host that previously only worked "by accident". The correct, tested method is using |
server
directive using default_server
broken by 9b4bb07
While users could just run a new container and point |
@Enchiridion could you try the fix proposed by @rhansen in #2214 and tell us if it works for you ? |
I run several proxied sites simultaneously, to make it easier to see which sites are active I'm using docker-gen with a custom .tmpl file to auto-generate an html file, with links and tools for each site, whenever sites are started/stopped. I'm displaying the page at http://localhost/, to do so my custom nginx config takes over being the default server. I don't override
/etc/nginx/conf.d/default.conf
, I named mine so it loads first. My custom config is really small:An update in commit 9b4bb07 broke it because it added
default_server
on lines 406, 408, 412, and 414. Nginx throws an error if there are multiple default servers for the same port.From what I've read in the nginx docs, adding
default_server
is unnecessary in default.conf since the firstserver
block becomes the default anddefault_server
is only needed if you want to override that, which is what I need to do. I don't know enough about the codebase of nginx-proxy to know if removing those now would be ok or not, else I'd make a PR to remove them.In the meantime, I've made a copy of
nginx.tmpl
, removed default_server, and replaced it in container using my Dockerfile, but it's not a long-term solution.The text was updated successfully, but these errors were encountered: