Skip to content
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

binding to an interface explicite is not possible multiple times #6321

Open
Hero9909 opened this issue May 17, 2024 · 2 comments
Open

binding to an interface explicite is not possible multiple times #6321

Hero9909 opened this issue May 17, 2024 · 2 comments

Comments

@Hero9909
Copy link

when using the default_bind and a custom or multiple custom binds on the same address ar used caddy tries to bind 2 two or more times to the address.

using caddy v2.7.6 h1:w0NymbG2m9PcvKWsrXO6EEkY9Ru4FJK8uQbYcev1p3A=

setup:
i have 3 services which need an upgrade from http to https, each listen on a local port
now i specify with caddy 3 sections

1.example.com:443 {
  bind 10.0.0.5
  reverse_proxy to-a
}
2.example.com:443 {
  bind 10.0.1.5
  reverse_proxy to-b
}
3.example.com:443 {
  bind 10.0.0.5 10.0.1.5
  reverse_proxy to-c
}

so this does not work, even if i remove the bind of the last block.

@francislavoie
Copy link
Member

The problem is that the Caddyfile adapter would need to recognize that both of those bind addresses will exist on other servers that exclusively listen to that address, then copy the routes for your 3 domain to both of those. It's not currently smart enough to do that.

Run caddy adapt -p on your Caddyfile to see what I mean, Caddy produces servers with listen addresses, and the servers must not overlap otherwise they will try to bind to the same address.

@mholt
Copy link
Member

mholt commented May 17, 2024

Oh... yeah, edge case. That is just a little more complicated than I wanted to do at the time. So if we're going to fix that we'll need to decide if it's worth the added complexity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants