Problem accessing Zammad behind Traefik

  • Used Zammad version: 3.4.0-4
  • Used Zammad installation source: docker-compose
  • Operating system: Centos 7
  • Browser + version: Chrome 84

Expected behavior:

Zammad can be accessed behind reverse proxy

Actual behavior:

Unable to access Zammad.

Steps to reproduce the behavior:

  • Install zammad in docker compose behind Traefik

I’m unable to reach zammad installed via docker compose behind traefik. Error from nginx container is

[error] 8#8: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.26.0.2, server: _, request: “GET / HTTP/1.1”, upstream: “http://172.26.0.5:3000/”, host: “zammad.example.com
172.26.0.2 - - [31/Jul/2020:05:33:41 +0000] “GET / HTTP/1.1” 502 568 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36”

My traefik config :

version: ‘3.7’

services:
traefik:
image: traefik:latest
container_name: traefik
restart: unless-stopped
security_opt:
- no-new-privileges:true
networks:
- proxy
ports:
- 80:80
- 443:443
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./data/traefik.yml:/traefik.yml:ro
- ./data/acme.json:/acme.json
labels:
- “traefik.enable=true”
- “traefik.http.routers.traefik.entrypoints=http”
- “traefik.http.routers.traefik.rule=Host(traefik.example.com)”
- “traefik.http.middlewares.traefik-auth.basicauth.users=user:password”
- “traefik.http.middlewares.traefik-https-redirect.redirectscheme.scheme=https”
- “traefik.http.routers.traefik.middlewares=traefik-https-redirect”
- “traefik.http.routers.traefik-secure.entrypoints=https”
- “traefik.http.routers.traefik-secure.rule=Host(traefik.example.com)”
- “traefik.http.routers.traefik-secure.middlewares=traefik-auth”
- “traefik.http.routers.traefik-secure.tls=true”
- “traefik.http.routers.traefik-secure.tls.certresolver=http”
- “traefik.http.routers.traefik-secure.service=api@internal”

networks:
proxy:
external: true

My zammad override ;

version: ‘2’
services:

zammad-nginx:
restart: unless-stopped
security_opt:
- no-new-privileges:true
networks:
- proxy
labels:
- “traefik.enable=true”
- “traefik.http.routers.zammad.entrypoints=http”
- “traefik.http.routers.zammad.rule=Host(zammad.example.com)”
- “traefik.http.middlewares.zammad-https-redirect.redirectscheme.scheme=https”
- “traefik.http.routers.zammad.middlewares=portainer-https-redirect”
- “traefik.http.routers.zammad-secure.entrypoints=https”
- “traefik.http.routers.zammad-secure.rule=Host(zammad.example.com)”
- “traefik.http.routers.zammad-secure.tls=true”
- “traefik.http.routers.zammad-secure.tls.certresolver=http”
- “traefik.http.routers.zammad-secure.service=zammad”
- “traefik.http.services.zammad.loadbalancer.server.port=80”
- “traefik.docker.network=proxy”

zammad-railsserver:
networks:
- proxy

zammad-websocket:
networks:
- proxy

zammad-scheduler:
networks:
- proxy

zammad-backup:
networks:
- proxy

zammad-elasticsearch:
networks:
- proxy

zammad-init:
networks:
- proxy

zammad-memcached:
networks:
- proxy

zammad-postgresql:
networks:
- proxy

networks:
proxy:
external: true

Issue occur due to ipv6 is disable in host machine. Just enable it will solve the problem.