Reputation: 21
in order to get a play framework app running I need to put in place a reverse proxy that will route all the traffic from the external endpoint (https) to the internal play app. I have notice that I cannot configure a nginx with the proxy_pass directive. I made some research online and I have found an app published by swisscom, CF Reverse Proxy, for cloud foundry http reverse proxy. However, this app does not fit my needs as the play app will be exposed on a random port by cloud foundry and not on 80 or 443.
I would like to have a way that the reverse proxy communicates via an internal endpoint to the backend app. What is the suggested way to do that ?
Upvotes: 0
Views: 234
Reputation: 11
If you want to use your own reverse proxy app and be able to directly communicated internally with a backend app you could use container-to-container networking for this. https://ict.swisscom.ch/2018/05/container-networking-with-cloud-foundry/ https://docs.cloudfoundry.org/concepts/understand-cf-networking.html
It allows your apps to talk directly with each other over TCP or UDP without traffic leaving the Cloud Foundry platform.
But as far as I know it should actually be possible to configure an NGINX with the official NGINX-Buildpack to use proxy_pass: https://docs.cloudfoundry.org/buildpacks/nginx/index.html Did you try with that buildpack?
And even then, your backend app should be anyway accessible via a mapped-route, the random port you mentioned is only used for the app container. But from the outside it will be reachable via $your-mapped-route.domain.com:443
Upvotes: 1