fooapi.com API的两个版本:v1和v2。如何在 marathon.json fooapi.com/v1/ 和 fooapi.com/v2/ .
fooapi.com
marathon.json
fooapi.com/v1/
fooapi.com/v2/
以下配置不起作用(最新的DCO):
"labels": { "HAPROXY_0_VHOST": "fooapi.com", "HAPROXY_DEPLOYMENT_GROUP": "api-grp", "HAPROXY_GROUP": "external", "HAPROXY_0_PATH": "/v1" }
在阅读了Marathon lb文档后,我通过添加 HAPROXY_0_HTTP_BACKEND_PROXYPASS_PATH 配置参数:
HAPROXY_0_HTTP_BACKEND_PROXYPASS_PATH
"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" }