I’m having some issues setting up the Tyk Portal with correct settings.
What I want is:
api.my-org.org → a portal
ui.my-org.org → the dashboard
Both domain names are registered as CNAMEs, and points to a single host that currently runs the dashboard (v220.127.116.11), and the dashboard is configured to listen on port 443 with the SSL settings enabled. The dashboard works as expected, but the portal pages doesn’t.
I have one single organization:
"owner_name" : "my-org",
"owner_slug" : "",
"cname_enabled" : true,
"cname" : "api.my-org.org",
tyk_analytics config is:
I think I’ve tried every concievable way to configure the
host_config settings and the
tyk_analytics.tyk_organisation objects, but I cannot get the portal pages to work:
- The «Open Your Portal» url from the Dashboard always points to a
- Going to `https://api.my-org.org/portal/ always results in a 404
How should I configure the dashboard and the organisation object in order to make this work?
This looks ok to me… but:
Have you tried removing the trailing slash from the request you are trying? i.e.:
No, both https://api.my-org.org/portal and https://api.my-org.org/portal/ gives me a 404.
I should probably add – I’m unable to set the
cname org setting using the «Set your portal domain» option in the Dashboard («There was a problem updating your CNAME, please contact support», level=error msg=“INvalid domain supplied, not saving: api.my-org.org” in the logs).
Also, regardless of whether the
cname_enabled settings are set, both
https://<ip>/<org-id>/portal/ works as expected (except none of the URLs).
Is there a way to get the Dashboard to log more (log level DEBUG or similar) and maybe figure out what happens when the 404 page is served?
Your problem lies here
Missed it in my delirium of jetlag yesterday. You need to tell Analytics to respect hostnames, because it will stop the IP form working, you need:
Ah, never touched that option.
That helped a bit – If I turn SSL off and serve at port 80, everyting works as expected. But if i turn SSL on and change the listen_port to 443, I now get 404 on both
I decided to dig a little, and it seems there are some problems with port numbers in the
- When serving at port 80, the following happens:
Host: sub.domain.org → OK
Host: sub.domain.org:80 → 404
- and on any other port
Host: sub.domain.org → 404
Host: sub.domain.org:N → OK
The latter one causes problems, because browsers generally don’t include the port number in the header field when accessing a
Ah, I think you’ve found a bug We only normalise the listen host on pot 80, will add a fix so that it compiles to the nightlies.
 That’s been pushed now - check our nightlies for the dashboard tarball, you should just need to replace the binary