title: Setting up phpmyadmin with traefik2 in docker
body: <p>I am having some trouble accessing my phpmyadmin through traefik2 reverse proxy! all the other apps I am using in my docker-compose are working correctly through traefik. Its as simple as setting the labels up, specififying which domain to use, and then going to that through a browser. Right now I am able to access phpmyadmin through the local ip and port, but unable to through my domain. I just get a 404 not found error. This is my phpmyadmin docker-compose setup. </p>
  
  <pre><code>  phpmyadmin:
      image: phpmyadmin/phpmyadmin:latest
      depends_on:
        - mariadb
      container_name: phpmyadmin
      restart: unless-stopped
      networks:
        - t2_proxy
      security_opt:
        - no-new-privileges:true
  #    volumes:
  #      - $USERDIR/docker/phpmyadmin/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php
      environment:
        - PMA_PORT=$DB_PORT
        - PMA_HOST=$MYSQL_HOST
  #      - PMA_ABSOLUTE_URI=$ABSOLUTE_URI
  #      - PMA_ARBITRARY=1
        - MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD
      ports:
        - $PHPMYADMIN_PORT:80
      labels:
        - "traefik.enable=true"
  #      - "traefik.backend=phpmyadmin"
        ## HTTP Routers
        - "traefik.http.routers.phpmyadmin-rtr.entrypoints=https"
        - "traefik.http.routers.phpmyadmin-rtr.rule=Host(`phpmyadmin.$DOMAINNAME`)"
        ## Middlewares
        - "traefik.http.routers.phpmyadmin-rtr.middlewares=chain-oauth@file"
        ## HTTP Services
        - "traefik.http.routers.phpmyadmin-rtr.service=phpmyadmin-svc"
        - "traefik.http.services.phpmyadmin-svc.loadbalancer.server.port=80"
  
  </code></pre>
  
  <p>I am also getting a very similar error with my php/apache container that I can access locally but not through traefik. All the other containers have been a simple swap of the labels, rename them and boom, they are accessible ! what am I doing wrong? I tried adding PMA_ABSOLUTE_URI=$ABSOLUTE_URI and I can't figure out how to enable ssl in phpmyadmin in docker. </p>
  
  <p>and it still doesnt work but phpmyadmin says:</p>
  
  <blockquote>
    <p>There is a mismatch between HTTPS indicated on the server and client. This can lead to a non working phpMyAdmin or a security risk. Please fix your server configuration to indicate HTTPS properly.</p>
  </blockquote>
  
  <p>And also for my apache server it is setup like this, with a similar problem where it can be accessed from localhost but not traefik!</p>
  
  <pre><code>  apache:
      build:
        context: $USERDIR/docker/apache
        dockerfile: Dockerfile
      container_name: apache
      volumes:
        - $USERDIR/WEBSITE:/var/www/html/
      ports:
        - 6546:80
      labels:
        - "traefik.enable=true"
        ## HTTP Routers
        - "traefik.http.routers.apache-rtr.entrypoints=https"
  #      - "traefik.http.routers.tautulli-rtr.rule=Host(`web.$DOMAINNAME`)"
        - "traefik.http.routers.apache-rtr.rule=Host(`$SECONDDOMAINNAME`)"
        ## Middlewares
        - "traefik.http.routers.apache-rtr.middlewares=chain-no-auth@file"
        ## HTTP Services
        - "traefik.http.routers.apache-rtr.service=apache-svc"
        - "traefik.http.services.apache-svc.loadbalancer.server.port=80"
  </code></pre>
  
  <p>sorry if this is alot, I am very new to docker, and really trying to figure this out! If i posted this in the wrong spot or something, let me know! </p>
  
  <p>and if you need anymore information, please also let me know!</p>