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

I basically have the following issue: whenever I add

option http-server-close 

to the haproxy config (either in frontend or backend section), haproxy will send a Connection: close header in the response - which is exactly the opposite of what is supposed to do.

I am basically trying to get client TCP connections persisted through keep-alive, but since this doesn't seem to work I can't have that unless I use the default (keep-alive) mode, which will do the same for the server-side - and I don't want that.

Any solutions? Is this a bug? Or am I missing something?

share|improve this question

No, I believe this is expected.

option http-server-close 

Will close the connection from HAProxy to the backend, but will keep the connection alive between the client and the haproxy-server.

HAProxy will close the connection if/when the timeout is hit, so you might want to tweak the timeout http-keep-alive and timeout client options.

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.