Can APIs share same listen_path bound on different domains?

I need to setup the following

api1.mydomain.com/api/testhttp://backend/api-v1

api2.mydomain.com/api/testhttp://backend/api-v2

Is this possible?

I tried setting up 2 separate apis in such a scenario, specifying different values for the “domain” property but the same listen_path, but all requests just seem to go to the first one, not the second.

This should work, but you need to enable custom domains in your tyk.conf

thanks, for other who stumble on this

in gateway, tyk.conf

enable_custom_domains: true

1 Like