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

Set IP address as virtual host? #382

Open
wegotoeleven opened this issue Mar 7, 2016 · 4 comments
Open

Set IP address as virtual host? #382

wegotoeleven opened this issue Mar 7, 2016 · 4 comments
Labels
type/feat PR for a new feature

Comments

@wegotoeleven
Copy link

Hey,

Normally, virtual hosts are specified using host names. Is it possible to redirect traffic to another container if specifying the IP address--rather than a DNS host name--as a virtual host?

@wanghaisheng
Copy link

have u figure out?

@wegotoeleven
Copy link
Author

Not yet, no.

@k2xl
Copy link

k2xl commented Feb 9, 2017

any luck now?

@thomasleveil
Copy link
Contributor

Nginx uses the information contained in the http request header to decide how to route that request to virtual hosts.
Those http request headers do not have the ip address information. So I don't see how nginx could do.

You could think of running 2 instances of nginx-proxy, each of them bound to a single ip address. This way depending on the ip address used, a different nginx-proxy would take care of the http request. But that would only work if those 2 nginx-proxy containers are not on the same docker host.

@tkw1536 tkw1536 added the type/feat PR for a new feature label Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feat PR for a new feature
Projects
None yet
Development

No branches or pull requests

5 participants