On 3 November 2011 21:34, Saul <s...@extremecloudsolutions.com> wrote: > My understanding was that multiple backends could use the same > interface, perhaps I was wrong, if that is the case, any suggestions > on how to be able to have multiple backends running tcp mode on port > 443 so I can match the url and redirect to the appropriate backend > from my HAproxy?
You can have multiple backends with a single frontend, and define various criteria to decide which backend to use for each incoming request. Having said that, there are problems in your configuration. Firstly, you are defining 2 frontends listening on the same port ("bind :443" twice), which is causing the "cannot bind socket" message. Second, you are attempting to use hdr_beg to match an HTTP Host: header, which you cannot do when HAproxy is handling SSL traffic in TCP mode, because HAproxy cannot read the HTTP request, it's encrypted. In order to use hdr_beg and similar criteria, you must be using plain HTTP, which requires you to use stunnel, nginx or something else in front of HAproxy to handle the SSL and make a plain HTTP connection to HAproxy. Hope this helps, Graeme.