问题
I want to set a special connection mode (httpclose) for one requested url, so my frontend configuration in haproxy looks like
....
acl is_conclose url_beg /close.php
option httpclose if is_conclose
...
The problem: haproxy always uses "option httpclose" and is ignoring the condition "if is_conclose".
How can I setup haproxy to respect the condition?
回答1:
option httpclose can be specified on either the frontend or the backend, and behaves the same whether it is encountered on the frontend or the backend for a given request.
Have you tried setting option httpclose
only for that backend where the rule ends up?
If that works, I'd duplicate the backend (if needed) and route that rule thru the new backend, but then specify option httpclose for the new one only.
来源:https://stackoverflow.com/questions/40763485/haproxy-select-connection-modes-based-on-url