我试图阻止特定的应用程序,否则通过haproxy模式打开的特定path。
frontend main *:80 log 127.0.0.1 local2 acl restrict_page path_beg -i /test/admin/system acl url_test path_beg -i /test acl url_test_invalid path_beg -i /test/admin/system use_backend test if url_test use_backend testinvalid if url_test_invalid backend test balance round-robin server test1 xx.xx.xx.252:80 check backend testinvalid errorfile 503 /etc/haproxy/errors/invalid.http
我想允许/testing路由到特定的服务器,但停止所有请求/testing/pipe理/系统。 我尝试了一些事情,首先使用acl restrict_page ,但没有任何区别。 我添加了一个虚拟redirect到该url模式,但它只适用于url_test不存在。
我正在运行一个老版本的haproxy 1.3.26,不幸的是,它没有升级它的选项。
有没有办法解决这个问题?
谢谢,Shamik