It feels like it’s almost working. It’s quite hard to verify all the different parts of a car that doesn’t let you open the bonnet, so I can only really judge how far along I am by trying to understand symptoms, rather than looking at how the parts are moving. But I do think I’m most of the way there.
I’ve used the example config to setup a reverse proxy for transmission. I have changed nothing, just made a 1-to-1 copy of transmission.subdomain.conf.example to transmission.subdomain.conf, and left it there. Restarted the docker, and tried to access it.
502 Bad Gateway
What does this mean? Nothing gets added in the log.
Only thing I can think of is the config seems to try to proxy to http://transmission:9091, which doesn’t exist. Why would it? Yes, the docker is called “transmission”, but why would it be accessible by its docker name via http? I don’t have a DNS server running, other than my router which just forwards to my ISP, so how would you expect this to work?
I mean, it’s called .example, so it must be an example for something, so I would expect these examples to work in some kind of scenario, just not mine.
Is there a mechanism that I don’t have, that translates docker names to their internal IP addresses?
Or am I poking around in totally the wrong area? Because like I said, the bonnet won’t open.
A 502 means swag can’t reach the app. Usually one of these reasons
You changed the port in the proxy conf
They don’t share a custom bridge
The container name doesn’t match what the proxy conf expects
Or rarely a resolver.conf issue
Docker DNS exists in docker, regardless of what you run
However, you will need a DNS record for this to work, as stated at the top of the conf
I’m on mobile and forums isnt nearly as easy as discord, so I will suggest you join there to continue unless my guidance helps get you to the finish line
I also suggest reading the swag documentation, which explains a lot of what you’ve asked
Discord demands my phone number, so I’m sorry but that ain’t happening, that’s where I draw the line.
You changed the port in the proxy conf
No I didn’t. I said I did a 1-to-1 copy, and so it’s pointing at 9091. I can absolutely reach it as well, if I go to http://[ip-addres]:9091.
They don’t share a custom bridge
I don’t know what that means. All my dockers are in “bridge” network mode, and so they can communicate among each other through their internal 172.x.x.x addresses, or by using port mappings on the host, just like any other client can.
The container name doesn’t match what the proxy conf expects
I’m guessing it’s not transmission vs Transmission, since dns is generally expected to be case-insensitive…
Or rarely a resolver.conf issue
Also no idea what that means.
Docker DNS exists in docker, regardless of what you run
That’s great. Do I need to do anything special to get it to work? Can I verify that it’s working?
Or should I just forward to the name of the host? It does feel a bit naff, now that I know docker dns is a thing, to ignore it completely.
Check your access.log / error.log in the swag logs folder, should point to what the issue is (I assume connection refused) and it’ll show you the port it’s trying to connect on.
I’d post your proxy-conf but also your compose for transmission, will help see where the issue is.
Just requires a custom bridge, the swag guide I linked walks you through this.
At that same location is the 502 help section which goes into how to check that resolver.conf bit I mentioned
You can do this, it would likely work but as you surmise it’s inefficient, you would nat from swag to the host, the nat from host to app. But if you need it up now while you look into things, it’s a good bandaid
I do believe nginx (what swag uses) has some case sensitivity quirks, so definitely check that, keep them all lower case
I just list all the options, unfortunately numerous people tell us they didn’t change anything, hours later we find out they did