Imported Google Group message.
Sender:Martin Buhr
.
Date:Friday, 2 October 2015 11:09:48 UTC+1.
Hi Ian,
There might be a confusion here as to what the listen_path and the api slug are.
The listen-path is the unique path that the tyk gateway assigns to the API to proxy, this must be unique and is used by the gateway only. To access an API via the listen_path, you need to speak directly to the Tyk Gateway (not the host manager / nginx), so your URL would be:
http://domain.com:3000/{listen_path}/resource/id
For each API, the listen path would be different, for the listen_path you gave above, it would be this:
http://domain.com:3000/bd7c97cd650e47dc47f654a2bb74f119/ip
And the other API would be:
http://domain.com:3000/810feec25e2b4e7a7b70fbad4d02a74c/ip
(I assume both are pointing at httpbin.org)
If you are using the host manager, then the API slug forms part of the domain (note, you’ll need a working domain), so then your path to the API might look like this (notice the different port):
http://domain.com:80/{slug}/ip
OR
http://{slug}.domain.com/ip
Both routes will be generated in the host manager.
So, to re-iterate, the API Slug will only work via NGINX and the listen pah will only work if you speak to the gateway directly.
If NginX is routing to one as a default, then one of your APis is misconfigured (maybe a missing API Slug?), alternatively, if it can’t match anything, I think it defaults to the first thing it finds, which might explain what’s happening to you.
To really get to the bottom of things, you’ll need to see what is in the nginx sites-enabled folder.
Cheers,
Martin