Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Different VIRTUAL_HOST to specific container ports #68

Closed
T4cC0re opened this issue May 26, 2016 · 1 comment
Closed

Different VIRTUAL_HOST to specific container ports #68

T4cC0re opened this issue May 26, 2016 · 1 comment

Comments

@T4cC0re
Copy link

T4cC0re commented May 26, 2016

Hi,

i have a request.

Let's say I have a container app1 with ports 443 and 8443. and I would like to forward to a specific port on that same container for a different VIRTUAL_HOST: e.g.:
https://some.example.com goes to port 443
and
https://another.example.com goes to port 8443

Is this at all possible?
If so, is it implemented and I am missing something or is this a feature not yet implemented?

Thanks in advance!

@tifayuki
Copy link
Contributor

No, it is not supported.

dockercloud/haproxy assumes one container has only one port to be load balanced with HTTP/HTTPS. If there are multiple ports exposed in a container, other ports should be either excluded from the load balancer or claimed to be used as a TCP ports.

In your case, you can put two nginx/haproxy containers in front of you app, and then link them to dockercloud/haproxy:


                        |------------nginx1-----------|
dockercloud/haproxy ----|                             |--------your app
                        |------------nginx2-----------|

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

No branches or pull requests

2 participants