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

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -