I have had a very strange error setting up TYK.
Incoming requests are handled by NGINX listening on port 80
The base config for NGINX contains:
# Enumerate all the Tyk servers here
upstream tyk {
server 127.0.0.1:5000;
}
upstream dashboard {
server 127.0.0.1:3000;
}
There are 3 subdomains for portal, gateway and dashboard that run a proxy pass to the servers above. They will do:
location / {
#rewrite /(.*) /[API_LISTEN_PATH]/$1 break;
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_pass http://dashboard;
}
If I enter:
I get a 404 not found error
http://dashboard.mydomain.com:3000
Displays the dashboard the page.
I setup the dashboard using:
sudo /opt/tyk-dashboard/install/setup.sh --listenport=3000 --redishost=localhost --redisport=6379 --mongo=mongodb://127.0.0.1/tyk_analytics --tyk_api_hostname="dashboard.mydomain.com" --tyk_node_hostname=http://localhost --tyk_node_port=8080 --portal_root=/portal --domain="dashboard.mydomain.com"
I setup the gateway with:
sudo /opt/tyk-gateway/install/setup.sh --dashboard=1 --listenport=8080 --redishost=localhost --redisport=6379 --domain="" --mongo=mongodb://127.0.0.1:27017/tyk_analytics
I have tried any number of combinations to try and get this working but I am at a total loss now and chasing my tail so I thought I would see if there was anyone who could help me find my mistake
Thanks