Closed dfanchon closed 7 years ago
@dfanchon I don't think it is easy to support such a use case. But you can manually specify another backend and make one of the domain point to the new backend.
For example, in your application, set VIRTUAL_HOST=http://domain1.com,https://domain1.com
only. Add EXTRA_FRONTEND_SETTINGS_80=acl new_rule hdr(host) -i domain2.com, use_backend domain2 if new_rule
. And use ADDITIONAL_BACKENDS
to replicate the existing backend.
It is more like a ugly workaround, but generally speaking, it is better to let the proxy to terminate the SSL if possible. If not, use TCP instead of HTTP load balancing.
Hi @tifayuki,
We are using haproxy in Dockercloud, with backends supporting both http and https domains (i.e VIRTUAL_HOST=http://domain1.com,https://domain1.com,http://domain2.com). ATM we can't use the force_ssl option because https redirection is set at backend level. Is there a chance to scope the redirection to the only domains declared with https scheme?
Thanks