Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

Is it possible to have a path appended (like the requirep below) but on a per server basis ? I can't see how it is possible in 1.3 or 1.4. There is redir, but redir does a HTTP redirect, not what I need.

  reqirep ^([^\ \t])(.*)[\ \t]/(.*) \1\2\ /businessGov/pad/businessgov.html\3
  server node1 someserver1:80 cookie node1  check
  server node1 someserver2:80 cookie node2  check
share|improve this question
up vote 3 down vote accepted

No it's not possible, because the HTTP rewriting is performed before selecting the server. And if the connection to the server failed we'd have to retry on another one, possibly reprocessing what has already been done over and over, which surely is not what you want.

Keep in mind that haproxy is a load balancer. The servers are then assumed to be doing the same thing and to receive equivalent requests. Otherwise you're more talking about independant farms that could be materialized in distinct backends with distinct rules.

share|improve this answer
yep - on reading the haproxy source I realised that it wouldn't be possible (its pretty neat source !). I was interested as nginx proxying refer to backends via full URL - not via server:port – Michael Neale Oct 13 '10 at 5:24
But this is unrelated. Nginx will receive the original unmodified request for the valid host and with its full URL. You must not have your servers bound to their own hostname but to the public hostname. – Willy Tarreau Dec 10 '10 at 5:50

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.