Register an external Service with Address + Path

Hello,

We have some external services having the same host, but we use path to differenciate them.
Now we would like to register those services separately in CONSUL.

Does Consul actually offers this possibility ?

e.g
domain.com/service1
domain.com/service2

Hi @fofiedelly,

Consul’s service catalog only supports associating IP/hostnames and ports for a given service. It does not support associating HTTP parameters such as path with a service instance.

If you have a reverse proxy like nginx in front of these services, you can use consul-template to generate a config that routes specific HTTP paths to a given backend service. See Load Balancing with NGINX and Consul Template | Consul - HashiCorp Learn for an example of how to do this using nginx.