haproxy - How do I route by path in DC/OS? -
let's have single domain fooapi.com
, 2 versions of api: v1 , v2. how configure haproxy in marathon.json
file both api versions can live behind same domain different path? eg. fooapi.com/v1/
, fooapi.com/v2/
.
the following configuration doesn't work (latest dcos):
"labels": { "haproxy_0_vhost": "fooapi.com", "haproxy_deployment_group": "api-grp", "haproxy_group": "external", "haproxy_0_path": "/v1" }
after reading through marathon-lb docs, i've solved adding haproxy_0_http_backend_proxypass_path
config parameter:
"labels": { "haproxy_0_vhost": "fooapi.com", "haproxy_deployment_group": "api-grp", "haproxy_group": "external", "haproxy_0_http_backend_proxypass_path": "/v1", "haproxy_0_path": "/v1" }
Comments
Post a Comment