Docker and VM Nginx Issues

Hello again forum,

It’s been a while.

I’ve run into a bit of an issue with my home server setup and I was hoping that you might be able to point me in the right direction. I’ve allready tried to search for the answer and reached to out “proffessionals” for help but all I seem to get is RTFM … but I don’t understand TFM.

Here is the setup. I have an Unraid server that works well. I have SWAG (read Nginx) installed as a docker container. It handles SSL Certs and the routing over port 443 to other docker container services that I have set up. This works well (with 1 exception that I’ll get to later).

Now I want to go outside of the “norm” and set up 2 x VM’s. One running matrix (synapse), and the other mastodon. Now I’m still fairly basic when it comes to these services and don’t fully understand everything. So I have read the official guides and followed them closely. If I set them as described and sort my network out to assume that each one is the only service running on my network it works perfectly, switch to the other it works perfectly. Put the SWAG container in front of them both so I can have access to both and my other services and we have problems.

I suspect the problem is because I am going from the unraid nginx to the vm nginx, and the web protocols do not like this. I have attempted with the mastodon vm to run it without nginx and it doesn’t work, there must be something in the way it needs to be setup that it won’t work without it.

I’ve put a basic network diagram below to illustrate:

does anyone have any advice for how I might solve this problemo?

Thanks in advance guys and talk soon,

GameOfDrones

Hmmm…so…

How exactly is your swag nginx configured?

Have you checked the logs of either swag nginx, or your mastodon/synapse?

Have you tried maybe running curl from within the swag container to verify container can reach your mastodon and synapse?