mesosphere / marathon-lb

Marathon-lb is a service discovery & load balancing tool for DC/OS
Apache License 2.0
449 stars 301 forks source link

Multi app in single domain #635

Open wablo opened 5 years ago

wablo commented 5 years ago

Hi all marathon-lb support many path in a single dns? i have a single dns mydns.com, i try to configure marathon-lb for this configuration mydns.com/app1 redirect the traffic to a specific service, and another configuration mydns,com/app2 to another service. which labes HAPROXY have to set in my json file? thanks in advance

andreaspeters commented 2 years ago

You have to set these labels:

HAPROXY_0_PATH = <your uri path>
HAPROXY_0_VHOST=<your domain>

PATH can also include regex. As example:

HAPROXY_0_PATH=^/api1/funx/(v2_alpha|r0)/sync$ 

But then you have to add also these label:

HAPROXY_0_HTTPS_FRONTEND_ACL_ONLY_WITH_PATH= acl path_{backend} path_reg {path}