Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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:\ 180.115.110.100 Host:\ www.foo.com

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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

share|improve this answer
    
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
add comment

Your Answer

 
discard

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.