I’ve setup a number of docker containers for my HTPC (plex, muximux, sabnzbd, transmission-vpn, sonarr, radarr, headphones, mylar, mylar, lazy librarian, jackett, hydranzb) and I would like to have a reverse proxy to help me manage traffic to each of them.
Ideally I want to be able to use a single domain and prefix it with a path.
For example: (htpc.mydomain.com/muximux, htpc.mydomain.com/sonarr, etc)
I’ve tried doing this with nginx and traefik and have ran into problems with css and javascript not loading because it can’t find the files. I recently heard about Caddy and thought I’d give it a shot and see if I have better luck!
Here are my files:
docker-compose.yml
version: ‘3’
services:
caddy:
image: abiosoft/caddy
volumes:
- $PWD/config/caddy/html:/srv
- $PWD/config/caddy/Caddyfile:/etc/Caddyfile
ports:
- 80:2015# MUXIMUX
muximux:
image: linuxserver/muximux
container_name: muximux
volumes:
- .config/muximux:/config
environment:
- PGID=1000
- PUID=1000
- TZ=America/Denver
restart: always
ports:
- 8000:80# SABNZBD
sabnzbd:
image: linuxserver/sabnzbd:latest
container_name: sabnzbd
volumes:
- ./config/sabnzbd:/config
- ./downloads/complete/sabnzbd:/downloads
- ./downloads/incomplete/sabnzbd:/incomplete-downloads
ports:
- 8080:8080
environment:
- EDGE=1
- PGID=1000
- PUID=1000
- TZ=America/Denver
restart: always
Caddyfile
htpc.mydomain.com {
tls offproxy /muximux localhost:8000 {
without /muximux
}proxy /sabnzbd localhost:8080 {
without /sabnzbd
}
}
When I try to access the page using http://htpc.mydomain.com/muximux and http://htpc.mydomain.com/sabnzbd, I get 502 Bad Gateway error. The only way I can access the pages are if I access them using http://localhost:8000 and http://localhost:8080.
I’m trying to keep things simple and not include authentication or SSL at the moment. I figured it should be pretty straight forward, but I’m not having much luck. Could anyone give me some pointers to get me going in the right direction. Thx.!