Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Running HAProxy with multiple SSL websites, and I would love to define a single backend (it's going to the same servers) but somehow specify the port to use on the backend in the front-end config, e.g.:

frontend front01_https
    mode            tcp
    default_backend https_cluster:1500

Trying mostly to tidy up my HAProxy config and make the stats more useful by combining the backends rather than having a backend for each front end or dropping down to listen blocks.

share|improve this question
up vote 1 down vote accepted

You're not going to be able to do what you want, because a backend isn't a server, it's a destination -- which is both an address and a port.

share|improve this answer
I thought as much, just wondered. Would be lovely to put in the backend server rather than duplicate the set of servers for every backend just with different ports. – Richard Benson May 1 '12 at 19:09

With recent haproxy (1.5-dev), you can use the "use-server" directive to force use of a specific server. It saves you from creating as many backends as you have rules. You simply put the rules in the same backend and have all the servers at the same place. In your case you could even have a "listen" section with both the "bind" directive and the servers in it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.