Wordpress not working with LE SSL cert

This wordpress configuration was previously working @ web.MyDomain.com

LE ssl is working on web1.Mydomain.com

WordPress does not work with LE ssl and produces a 404 error.

I think this is a container communication issue but am not sure how to address it.

Thanks for your help

version: "3.3"

services:
  traefik:
    image: "traefik:v2.10"
    container_name: "traefik"

    labels:
      - "traefik.enable=true"
      - "traefik.http.middlewares.auth.basicauth.users=user1:$$.......,user2:$$......"
      - "traefik.http.routers.traefik.rule=Host(`traefik.Mydomain.com`)"
      - "traefik.http.routers.traefik.service=api@internal"
      - "traefik.http.routers.traefik.middlewares=auth"
      - "traefik.http.routers.traefik.entrypoints=websecure"
      - "traefik.http.routers.traefik.tls.certresolver=myresolver"

    command:
      - "--api.dashboard=true"
      - "--log.level=DEBUG"
      #- "--api.insecure=true"
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entrypoints.web.address=:80"
      - "--entrypoints.websecure.address=:443"
      - "--certificatesresolvers.myresolver.acme.dnschallenge=true"
      - "--certificatesresolvers.myresolver.acme.dnschallenge.provider=cloudflare"
      #- "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
      - "--certificatesresolvers.myresolver.acme.email=postmaster@Mydomain.com"
      - "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
    ports:
      - "80:80"
      - "443:443"
      - "8080:8080"
    environment:
      - CLOUDFLARE_EMAIL=MyAddress@gmail.com
      - CLOUDFLARE_DNS_API_TOKEN=..............
    volumes:
      - "./letsencrypt:/letsencrypt"
      - "/var/run/docker.sock:/var/run/docker.sock:ro"

  web1:
    image: nginx:latest
    container_name: "web1"
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.web1.rule=Host(`web1.Mydomain.com`)"
      - "traefik.http.routers.web1.entrypoints=websecure"
      - "traefik.http.routers.web1.tls.certresolver=myresolver"
    volumes:
      - ./index1.html:/var/www/websites/index.html
      - ./default.conf:/etc/nginx/conf.d/default.conf

  nginx:
    image: nginx:latest
    container_name: web-serv
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.web.rule=Host(`web.Mydomain.com`)"
      - "traefik.http.routers.web.entrypoints=websecure"
      - "traefik.http.routers.web.tls.certresolver=myresolver"

    volumes:
      - ./wordpress:/var/www/wordpress
      - ./websites:/var/www/websites
      - ./conf.d:/etc/nginx/conf.d
  mysql:
    image: mysql:latest
    container_name: db-serv
    environment:
      MYSQL_DATABASE: wpdb
      MYSQL_USER: wpuser
      MYSQL_PASSWORD: secret
      MYSQL_ROOT_PASSWORD: secret
    volumes:
      - ./dbdata:/var/lib/mysql
  php-fpm:
    image: bitnami/php-fpm:latest
    container_name: php-fpm
    volumes:
      - ./wordpress:/var/www/wordpress
volumes:
  dbdata:
  wordpress:
  websites:
  conf.d:


Compare with simple Traefik example.

I usually prefer to use explicit Docker networks and not rely on default bridge network.

Check Traefik access log and target container access log to see where requests fail.

You installed Wordpress in web root?

Thanks for the reply.

Unfortunately that code([simple Traefik example]) completely blew up..
Unescaped characters, images that would not load, no LE providers, etc.

What I had was working including the static pages. What was not working was the container communication.

I did not see this simple Traefik code anywhere in the documentation. Where did that come from?

At the end of the day it appears to be a container communication issue.

the wordpress folder is at /var/wwww/wordpress nginx default.conf is configured for that location too.

The simple Traefik example works for me using docker compose. I use it here regularly as default template and so far no one else has complained. So maybe check your system.

There are also other people showing working configs, use search, see example post.

The docker compose file I displayed works with whoami, web1, web2 and is SSL encrypted. It also works with ssh and scp.

What it is not doing is working with a multi-tier wordpress deployment that was working prior to enabling SSL encryption.

Somehow the communication with the database and/or php stopped working when LE SSL was enabled.

The question is what has changed and/or how do I get the proper log to see what is going on with this multi-tier application.