On Wed, Oct 01, 2014 at 11:42:13PM +0200, Lukas Tribus wrote: > Hi Alexander, > > > > Is it possible to bind both HTTP and HTTPS on the same port with haproxy. > > Something like this: > > > > frontend data-in > > mode http > > bind 0.0.0.0:8080 > > crt if ssl /path/to/crt > > > > Obviously above doesn't work. Is there something similar? > > There may be something, but you will have to put the frontend in TCP mode, and > hairpin the connection to the correct frontend. > > Try looking up some haproxy+ssh+https+same+port blog posts on Google, > that should point you in the right direction.
Absolutely. We've not implemented anything to switch the protocol handler depending on the traffic. This is something which could now be possible given that the protocols are much more dynamic than what they used to be, but we'd still have to define how we want to make this behaviour configurable, and ensure it's not enabled by default. I'm thinking that the only use for this would be to return a hard coded error page indicating that HTTP was sent over an HTTPS port, but I could be wrong. Willy

