2

I'm using Docker Cloud with https://github.com/docker/dockercloud-haproxy image to load balance underlying containers.

I wonder if a single underlying container may be served both with SSL and without?

The documentation mentions:

SSL termination is enabled when:

at least one SSL certificate is set,

and either VIRTUAL_HOST is not set, or it is set with "https" as the scheme.

So, to have both http and https endpoints, I definitely cannot insert 'https' scheme in the VIRTUAL_HOST - that will stop http endpoint. And if I unset VIRTUAL_HOST, http endpoint will stop working again because it needs to know its name.

Having noted that, VIRTUAL_HOST supports scheme-less URLs so it kind of sounds like it can serve http and https for a single container.

Any thoughts or experience?

Community
  • 1
  • 1
Denis Mysenko
  • 6,366
  • 1
  • 24
  • 33

0 Answers0