haproxy select connection modes based on url

限于喜欢 提交于 2019-12-25 04:28:08

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!