1. Caddy version (caddy version
):
v2.3.0
2. How I run Caddy:
I run Caddy as a reverse proxy for internal network use via Docker/Docker Compose
a. System environment:
Ubuntu v18.04.5, Docker v20.10.3, Docker Compose v1.25.0
b. Command:
docker-compose up -d
c. Service/unit/compose file:
version: "3.7"
services:
caddy:
image: caddy
container_name: caddy
volumes:
- ./.caddy/Caddyfile:/etc/caddy/Caddyfile
- caddy-config:/config
- caddy-data:/data
ports:
- 80:80
- 443:443
networks:
- reverse-proxy
restart: unless-stopped
volumes:
caddy-config:
name: caddy-config
caddy-data:
name: caddy-data
networks:
reverse-proxy:
name: reverse-proxy
d. My complete Caddyfile or JSON config:
http://transmission.fantasio.local {
reverse_proxy transmission:9091
}
http://transmission2.fantasio.local {
reverse_proxy transmission2:9091
}
3. The problem I’m having:
I have 2 Docker containers with names transmission
and transmission2
both exposing their web UI on port 9091. When both containers are running everything works, http://transmission.fantasio.local points to transmission
and http://transmission2.fantasio.local points to transmission2
.
However, if I stop transmission
, http://transmission.fantasio.local will start showing transmission2
instead. Can anyone tell me what could be happening here? When transmission
is stopped I want http://transmission.fantasio.local to show error.