So we have 2 weeks since we started using Haproxy and everything was working fine. 2 Days ago we added a new frontend acl rule but it doesn’t seem to working correctly.
Whenever we put the url https://www.url.com/quotes it directs the request to the correct backend. But when we use https://www.url.com/quotes-rest-api it directs to the wrong backend. Actually it seems to be using the same backend as the previous one.
This is the configuration we have and the logs
frontend appcliente
bind 172.20.1.96:443 ssl crt /etc/pki/ca-trust/source/anchors/clientes.com.pa.pem
mode http
option httplog
acl url_app path -i -m beg /app-gateway-service-rest
default_backend appc1
acl url_app6 path -i -m beg /validate
use_backend procli if url_app6
cl url_app3 path -i -m beg /banners-gateway-rest-api
use_backend appc2 if url_app3
acl url_app14 path -i -m beg /quote
use_backend procli if url_app14
acl url_app16 path -i -m beg /quotes-gateway-rest-api
use_backend appc2 if url_app16
backend appc1
balance roundrobin
mode http
stats enable
cookie JSESSIONID prefix
server Mngt_APP1 172.17.8.24:9016
server Mngt_APP2 172.17.8.25:9016
backend appc2
balance roundrobin
mode http
stats enable
cookie JSESSIONID prefix
server PROMGNT 10.240.194.189:8081
backend procli
balance roundrobin
mode http
stats enable
cookie JSESSIONID prefix
server PROMGNT 10.240.194.189:8086
###########
Logs
###########
[27/Mar/2023:16:48:03.615] appcliente~ appc2/PROMGNT 45/0/2/504/551 204 73 - - --NN 5/4/0/0/0 0/0 “GET /banners-gateway-rest-api/api/v1/gateway/banners HTTP/1.1”
[27/Mar/2023:16:48:25.410] appcliente~ procli/PROMGNT 273/0/5/6/284 404 250 - - --NN 4/1/0/1/0 0/0 “GET /quotes-gateway-rest-api/api/v1/quotes/departments HTTP/1.1”
###########
Not sure if its because we already have acl rule with the word quote and is using that same rule, but the other acl rule has been specified as “quotes-rest-api…”
I tried to use some rules in the backend like this
reqrep ^([^\ :])\ /prueba(.) \1\ /quotes-gateway-rest-api\2
So whenever someone typed url.com/prueba it redirecto quotes-gateway… but still doesn’t solve the issue.
HA-Proxy version 1.5.18 2016/05/10
Any help appreciated.