Reverse proxy on Debian VPS with docker

At home I have a server setup with docker via unraid. Im running Reverse Proxy Manager for external domains with ssl. Everything is working fine.

Now I’m trying to do a similar thing on a VPS from a local webhost. It’s running Debian 9 with Directadmin at the moment. Most of it went fine.

I’ve got docker running, apps are reachable through their respective ports. Nginx Proxymanager is running, the default http page is loading successful (https isnt not sure if this matters). Now here is the issue, when trying to setup proxy hosts everything works, it requests the SSL via letsencrypt so this should mean dns is setup properly.

Now when I try to forward to any of my subdomains to my docker containers it just keeps on loading till eventually a 504 gateway-timeout pops. However when I forward a subdomain to my Directadmin console at port 2222 it resolves fine.

I have tried this on http and https and getting timeouts on both. Initially I did have to disable the apache server running on Directadmin to get NPM to use ports 80/443

I’m not quite sure what would be causing these time-outs only for Docker and not for Directadmin.

Any help is appreciated