I am going through an existing HAProxy config file and trying to make sense out of it. I am new to HAProxy. What does the following line do?

reqirep ^Host:\ Host:\ www.foo.com


It replaces lines matching Host: with Host: www.foo.com in the HTTP header in a case insensitive way. See also the documentation.

  • Thanks for that. When would this be done, when the request comes in or goes out? Also, any idea why would someone what to do something like this? – foobarmoo Nov 14 '12 at 13:32
  • It is done only on request headers that come in and will be forwarded by haproxy. As to why someone would want that: some servers refuse requests containing a Host: XXX headers where they don't recognize XXX. If the server cannot be fixed, an haproxy workaround may work. – Dennis Kaarsemaker Nov 14 '12 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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