One subdomain is not resolved correctly

I have had a number of services being successfully run through Traefik for a number of months. This past week, I have been trying to add a mailu server to the mix. So far, I have not been able to get the admin interface, which is served over HTTP, to work. Every attempt to connect to mail.my.tld/admin is met with a 404 error, and the request never even makes it to mailu's nginx server, according to its logs. This is strange, because my configuration is not different from my other HTTP services, which work fine. For example, my Plex configuration has the following labels:

    labels:
      - traefik.enable=true
      - traefik.http.routers.plex.rule=Host(`plex.my.tld`)
      - traefik.http.routers.plex.entrypoints=http,https
      - traefik.http.routers.plex.tls=true
      - traefik.http.routers.plex.tls.certresolver=letsencrypt
      - traefik.http.services.plex.loadbalancer.server.port=32400
      - traefik.http.services.plex.loadbalancer.server.scheme=https

And here is my configuration so far for my mailu server:

    labels:
      - traefik.enable=true
      - traefik.http.routers.mail_front.rule=Host(`mail.my.tld`)
      - traefik.http.routers.mail_front.entrypoints=http,https
      - traefik.http.routers.mail_front.tls=true
      - traefik.http.routers.mail_front.tls.certresolver=letsencrypt
      - traefik.http.routers.mail_front.service=mail_front
      - traefik.http.services.mail_front.loadbalancer.server.port=80
      - traefik.http.services.mail_front.loadbalancer.server.scheme=http

Am I missing something?

I don't know mailu, but I have a few basic questions, pardon my ignorance.

  1. Labels don't always maketh the container. Is it on the right network? Any other config that might be useful?
  2. Do you get a certificate? Check your acme.json file. If no certificate, then something might not be routed correctly.
  3. Add an alpine container on the mailu network (or add it to the service). docker exec into it. Can you get to mailu_nginx (or whatever the container is called) from the alpine container?
  1. It is on the webproxy network, which all of my web-facing containers are on.
  2. There is a certificate for mail.my.tld in acme.json.
  3. I spawned an alpine container on my webproxy networ, and I was able to ping the mailu frontend container and the traefik container on port 80 with netcat.

Some more context:

  1. The mailu router and service show up in the Traefik dashboard with no errors
  2. The mailu front end is a plain nginx http server listening on port 80
  3. The traefik logs report a 404 error every time I try to access the mailu front end, and the mailu front end (nginx) logs don't show any connection received. This means the connection is being terminated by traefik, so I am fairly certain there is something going wrong there. Do you know of any handy ways to debug this?

Yeah, I've been in that situation before. I'm just sitting here yelling "WTF!" and all I get are 404s.

The nuclear option. Restart it all. Traefik, then mailu. But, I'm sure you want something more defined, as do I.

Take a look at it holistically. There could be something contradictory or you could be missing a piece or have misspelled something.

Just looking at a sample mailu docker-compose.yml (not yours), I can see that it starts it's own network. I'll bet that you have a custom network in your service and forgot to put tell Traefik about it.

    labels:
      - traefik.docker.network=custom_network

I have restarted both containers and services many times. I've also tried setting Traefik's logging mode to DEBUG, but it still just says 404 error. The mailu frontend container is on a custom network, but it's also on the webproxy network, which is the network that all my front end containers are on. All of my web-facing containers are configured this way, and they all work except for mailu. Also, if it were on the wrong network, wouldn't there be an error reported in the dashboard?

If mailu is on TWO networks, Traefik may be confused. Force it with the network label.

Put an alpine container on the webproxy network, can you {ping|curl} mailu_nginx?

I manually set the network label to webproxy, and I am able to ping my frontend container, which is called mailu-frontend, from an alpine container on the same network.

Hi there.
I have completely the same installation.
I mean PLEX that's works and mailu that's not working with traefik.
And the same error is reproducing,

@super-cooper
Any updates yet?
Did you resolve this problem?