Imported Google Group message.
Date:Friday, 18 December 2015 13:49:47 UTC.
What you are doing here is essentially what we used to do with the host manager, proxying the portal through port 80, there's a few rewrites you need, take a look at the nginx config template we use for portal based configs, it will show you what you need to proxy.
Here's the relevant nginx setup:
You can see all the rewrites (there's 3 to get it all working)
There's another solution though, we use it in our new docker setup since it all runs on the same host and we want everythign to run on port 80, and that is have Tyk handle the proxying for you, as in the Tyk Gateway runs on port 80, then you set up the Portal as a special set of APIs in Tyk and the gateway does the same thing that you have HAProxy doing now.
It depends on what you are trying to achieve, but if you're not wedded to HAProxy then this is the fastest thing to do, take a look here (you'll need to figure out the bits for your config yourself):
Here' the setup script:
The highlighted curl command is a bootstrap API command that generates the relevant proxy entries for you, you could just run this against your API
The tyk.conf and the tyk_dashboard confs are quite specific, i.e. you need to setup domain maangement a specific (open) way: