I run a calibre-web container behind traefik (2.3.1) using LetsEncrypt for TLS enablement.
If i type in my https URL to the calibre service, i got a ERR_ADDRESS_UNREACHABLE and the Browser shows up the same URL without (s) http. If i type in the https adress again - it works.
What i have done so far. As mentionend in this forum, the problem lies mostly on the application container side. And yes, i found a problem description here that matched to my issue. But i am using a container where that issue already fixed.
Actually i run the traefik container in DEBUG mode and compared the good an bad request with each other. Nothing suspicious found. The X-Forward Headers filled correctly.
Just to be sure. I am very new to use traefik. Perhaps an Expert can check my docker-compose configuration?
traefik.yml
## STATIC CONFIGURATION
log:
level: DEBUG
api:
insecure: true
dashboard: true
entryPoints:
web:
address: ":80"
websecure:
address: ":443"
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
certificatesResolvers:
lets-encr:
acme:
#caServer: https://acme-staging-v02.api.letsencrypt.org/directory
email: [myadress]
storage: acme.json
dnsChallenge:
provider: cloudflare
resolvers:
- "1.1.1.1:53"
- "8.8.8.8:53"
docker-compose-traefik.yml
version: "3.7"
services:
traefik:
image: "traefik:latest"
container_name: "traefik"
hostname: "[hostname replaced]"
env_file:
- .env
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./traefik.yml:/traefik.yml:ro"
- "./acme.json:/acme.json"
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.tls.certresolver=lets-encr"
- "traefik.http.routers.traefik.tls.domains[0].main=*.$MY_DOMAIN"
- "traefik.http.routers.traefik.tls.domains[0].sans=$MY_DOMAIN"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.permanent=true"
- "traefik.http.routers.redirect-https.rule=hostregexp(`{host:.+}`)"
- "traefik.http.routers.redirect-https.entrypoints=web"
- "traefik.http.routers.redirect-https.middlewares=redirect-to-https"
networks:
default:
external:
name: $DEFAULT_NETWORK
docker-compose-calibre-web.yml
version: "3.7"
services:
calibre-web:
image: linuxserver/calibre-web:latest
container_name: calibre_web
hostname: calibre
labels:
- "traefik.enable=true"
- "traefik.http.routers.calibre.entrypoints=websecure"
- "traefik.http.routers.calibre.rule=Host(`calibre.$MY_DOMAIN`)"
- "traefik.http.routers.calibre.tls.certresolver=lets-encr"
- "traefik.http.routers.calibre.tls.domains[0].main=calibre.$MY_DOMAIN"
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Berlin
volumes:
- /home/pirate/calibre/config:/config
- /home/pirate/calibre/books:/books
ports:
- 8083:8083
restart: unless-stopped
networks:
default:
external:
name: $DEFAULT_NETWORK
Any help, to narrow down the issue are really appreciated. The guys from the linuxserver.io team send me over here.