Can not visit two sites in one browser at the same time

I deployed gitea and harbor on one machine with traefik as the proxy. But I can not visit these two sites as the same time in one browser. After I visit gitea, all requests will be proxy to gitea. But I can visit these two sites in two browsers at the same time.

traefik docker-compose config

services:
  reverse-proxy:
    # The official v2 Traefik docker image
    image: traefik:v2.5
    # Enables the web UI and tells Traefik to listen to docker
    command: 
    - --api.insecure=true 
    - --providers.docker 
    - --entrypoints.web.address=:80
    - --entrypoints.websecure.address=:443
    - --log
    - --accesslog
    - --log.level=DEBUG
    ports:
      # The HTTP port
      - "80:80"
      - "443:443"
      # The Web UI (enabled by --api.insecure=true)
      - "8000:8080"
    volumes:
      # So that Traefik can listen to the Docker events
      - /var/run/docker.sock:/var/run/docker.sock
    restart: always
    networks:
    - traefik-public
networks:
  traefik-public:
    external: true

gitea config

server:
    labels:
      - traefik.http.routers.gitea.entrypoints=web
      - traefik.http.routers.gitea.rule=Host(`git.abc.com`)
      - traefik.http.routers.gitea.service=gitea
      - traefik.http.services.gitea.loadbalancer.server.port=3000

      - traefik.tcp.routers.gitea.entrypoints=websecure
      - traefik.tcp.routers.gitea.rule=HostSNI(`git.abc.com`)
      - traefik.tcp.routers.gitea.service=gitea
      - traefik.tcp.routers.gitea.tls.passthrough=true
      - traefik.tcp.services.gitea.loadbalancer.server.port=3443

harbor config

  proxy:
    labels:
    - traefik.http.routers.proxy.entrypoints=web
    - traefik.http.routers.proxy.rule=Host(`hub.abc.com`)
    - traefik.http.routers.proxy.service=proxy@docker
    - traefik.http.services.proxy.loadbalancer.server.port=8080
    - traefik.tcp.routers.proxy.entrypoints=websecure
    - "traefik.tcp.routers.proxy.rule=HostSNI(`hub.abc.com`)"
    - traefik.tcp.routers.proxy.service=proxy@docker
    - "traefik.tcp.routers.proxy.tls.passthrough=true"
    - "traefik.tcp.services.proxy.loadbalancer.server.port=8443"

Hello @fwt11,

Thanks for your interest in Traefik!

Your issue is tied to the HTTP2 connection reuse feature of the browser.
Since you are probably using a wildcard certificate that satisfied both git.abc.com and hub.abc.com,
the connection established for git.abc.com is reused for requests to hub.abc.com.

A solution is to have a dedicated certificate for each domain, then the browser will establish two different connections for each of your domains.

Hope it helps!

1 Like

Thanks for your reply, I'll try to get a dedicated certificate for each domain.