Loadbalancer with path /path/* should work but is not

My situation

subdomain.example.com —> service1
subdomain.example.com/path/* --> service2
subdomain.example.com/.well-known/* —> service3

in the load balancer whatever I do it end up in service1 I put the rule at the top
port_rules:

  • hostname: subdomain.example.com
    path: /test/*
    priority: 1
    protocol: http
    service: nginxtest
    source_port: 80
    target_port: 80
    port_rules:
  • hostname: subdomain.example.com
    path: /.well-known/*
    priority: 2
    protocol: http
    service: letsencrypt-nginx
    source_port: 80
    target_port: 80

in both case I’m able to curl the container from haproxy

curl 10.42.6.201
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>

what am I doing wrong ?

did you ever find a solution?

You might need to also specify a rule for path /. Also I don’t think you need to use the * in the other paths you specify.

Can you post the resulting /etc/haproxy/haproxy.cfg that is present in the load balancer container? That should give a good indication of what’s wrong

No I didn’t, I worked around it, however that is something that will resurface soon