Having trouble with a new domain

Firstly, the reason I'm still using alpha8 is because when I tried beta1 I was met with:

2019/08/23 10:48:06 server.go:3012: http: TLS handshake error from cloudflare_ip: remote error: tls: illegal parameter when trying to access from Cloudflare proxy and

2019/08/23 10:48:06 server.go:3012: http: TLS handshake error from 192.168.0.1:62314: remote error: tls: bad certificate when trying to access without a cloudflare proxy.

Anyway, I digress.

I have the domain bfayers.me which is accessed via the following routers and services:

    [http.routers.bfmRouter]
      rule = "Host(`bfayers.me`, `bfayers.tech`)"
      service = "bfm"
      middleswares = ["gotohttps"]

    [http.services.bfm.LoadBalancer]
      method = "wrr"
      [[http.services.bfm.LoadBalancer.servers]]
         url = "http://192.168.0.220/"
         weight = 1

If I browse to https://bfayers.me I am met with the result of the http service, however If I browse to https://bfayers.tech I reach a 404 not found, If i setup a seperate http router just for the .tech domain (still routing to the bfm service) it also returns a 404, infact trying to get bfayers.tech to go to anything gives a 404 not found.

Here is a (redacted) version of my entire config:

Full Config
[entrypoints]
  [entrypoints.web]
    address = ":80"
  [entrypoints.web-secure]
    address = ":443"

[log]
  filePath = "/root/traefik/log.log"
[accessLog]


#Letsencrypt
[acme]
  email = "email_address@gmail.com"
  storage = "/root/traefik/acme.json"
  caServer = "https://acme-v02.api.letsencrypt.org/directory"
  [acme.dnsChallenge]
    provider = "cloudflare"
  [[acme.domains]]
    main = "*.[redacted].net"
  [[acme.domains]]
    main = "*.bfayers.me"
    sans = ["bfayers.me"]
  [[acme.domains]]
    main = "*.bfayers.tech"
    sans = ["bfayers.tech"]

[providers]
  [providers.file]
  #watch = true
  directory = "/root/traefik"
  filename = "config.toml"

[http]

  [http.middlewares]
    [http.middlewares.vrsPrefix.AddPrefix]
      prefix = "/VirtualRadar/"
    [http.middlewares.gotohttps.redirectscheme]
      scheme = "https"
    [http.middlewares.vrsHeaders.headers]
      Host = "vrs.[redacted].net"

  [http.routers]
    [http.routers.xeomaRouter]
      rule = "Host(`kam.[redacted].net`)"
      service = "xeoma"
      middleswares = ["gotohttps"]
      [http.routers.xeomaRouter.tls]
    [http.routers.plexRouter]
      rule = "Host(`plex.[redacted].net`)"
      service = "plex"
      middleswares = ["gotohttps"]
      [http.routers.plexRouter.tls]
    [http.routers.vrsRouter]
      rule = "Host(`vrs.[redacted].net`)"
      service = "vrs"
      middleswares = ["vrsHeaders", "gotohttps"]
      [http.routers.vrsRouter.tls]
    [http.routers.hassRouter]
      rule = "Host(`hass.[redacted].net`)"
      service = "hass"
      middleswares = ["gotohttps"]
      [http.routers.hassRouter.tls]
    [http.routers.ncRouter]
      rule = "Host(`nc.[redacted].net`)"
      service = "nc"
      middleswares = ["gotohttps"]
      [http.routers.ncRouter.tls]
    [http.routers.bfmRouter]
      rule = "Host(`bfayers.me`, `bfayers.tech`)"
      service = "bfm"
      middleswares = ["gotohttps"]
      [http.routers.bfmRouter.tls]
    [http.routers.[redacted3]MainR]
      rule = "Host(`[redacted2].tld`)"
      service = "[redacted3]MainR"
    [http.routers.[redacted3]Img]
      rule = "Host(`i.[redacted2].tld`)"
      service = "[redacted3]Img"
    [http.routers.[redacted3]Bots]
      rule = "Host(`bots.[redacted2].tld`)"
      service = "[redacted3]Bots"


  [http.services]
    [http.services.xeoma.LoadBalancer]
      method = "wrr"
      [[http.services.xeoma.LoadBalancer.servers]]
         url = "http://192.168.0.206:10090/"
         weight = 1
    [http.services.plex.LoadBalancer]
      method = "wrr"
      [[http.services.plex.LoadBalancer.servers]]
         url = "http://192.168.0.207:32400/"
         weight = 1
    [http.services.vrs.LoadBalancer]
      method = "wrr"
      [[http.services.vrs.LoadBalancer.servers]]
         url = "http://192.168.0.213:8080/"
         weight = 1
    [http.services.hass.LoadBalancer]
      method = "wrr"
      [[http.services.hass.LoadBalancer.servers]]
         url = "http://192.168.0.214:8123/"
         weight = 1
    [http.services.nc.LoadBalancer]
      method = "wrr"
      [[http.services.nc.LoadBalancer.servers]]
         url = "http://192.168.0.216/"
         weight = 1
    [http.services.bfm.LoadBalancer]
      method = "wrr"
      [[http.services.bfm.LoadBalancer.servers]]
         url = "http://192.168.0.220/"
         weight = 1
    [http.services.[redacted3]MainR.LoadBalancer]
      method = "wrr"
      [[http.services.[redacted3]MainR.LoadBalancer.servers]]
         url = "http://192.168.0.220:8081/"
         weight = 1
    [http.services.[redacted3]Img.LoadBalancer]
      method = "wrr"
      [[http.services.[redacted3]Img.LoadBalancer.servers]]
         url = "http://192.168.0.220:8082/"
         weight = 1
    [http.services.[redacted3]Bots.LoadBalancer]
      method = "wrr"
      [[http.services.[redacted3]Bots.LoadBalancer.servers]]
         url = "http://192.168.0.220:8083/"
         weight = 1

Thanks,
Ben

I have no updated to v2.0 (final) and this still does not work.

Here is my new full config for v2.0 final release where I still get the same issue:

Full Config
[entrypoints]
  [entrypoints.web]
    address = ":80"
  [entrypoints.web-secure]
    address = ":443"

[log]
  filePath = "/root/traefik/log.log"
[accessLog]

[api]
  insecure = true
  dashboard = true

#Letsencrypt
[certificatesResolvers]
  [certificatesResolvers.prod]
    [certificatesResolvers.prod.acme]
      storage = "/root/traefik/acmev2.json"
      caServer = "https://acme-v02.api.letsencrypt.org/directory"
      email = "ben.fayers@gmail.com"
      [certificatesResolvers.prod.acme.dnsChallenge]
        provider = "cloudflare"


[providers]
  [providers.file]
  #watch = true
  directory = "/root/traefik"
  filename = "config.toml"

[http]

  [http.middlewares]
    [http.middlewares.vrsPrefix.AddPrefix]
      prefix = "/VirtualRadar"
    [http.middlewares.gotohttps.redirectscheme]
      scheme = "https"
    [http.middlewares.vrsHeaders.headers]
      Host = "vrs.[redacted].tld"

  [http.routers]
    [http.routers.xeomaRouter]
      rule = "Host(`kam.[redacted].tld`)"
      service = "xeoma"
      middleswares = ["gotohttps"]
      [http.routers.xeomaRouter.tls]
        certResolver = "prod"
    [http.routers.plexRouter]
      rule = "Host(`plex.[redacted].tld`)"
      service = "plex"
      middleswares = ["gotohttps"]
      [http.routers.plexRouter.tls]
        certResolver = "prod"
    [http.routers.vrsRouter]
      rule = "Host(`vrs.[redacted].tld`)"
      service = "vrs"
      middleswares = ["vrsPrefix", "vrsHeaders", "gotohttps"]
      [http.routers.vrsRouter.tls]
        certResolver = "prod"
    [http.routers.hassRouter]
      rule = "Host(`hass.[redacted].tld`)"
      service = "hass"
      middleswares = ["gotohttps"]
      [http.routers.hassRouter.tls]
        certResolver = "prod"
    [http.routers.ncRouter]
      rule = "Host(`nc.[redacted].tld`)"
      service = "nc"
      middleswares = ["gotohttps"]
      [http.routers.ncRouter.tls]
        certResolver = "prod"
    [http.routers.bfmRouter]
      rule = "Host(`bfayers.me`, `bfayers.tech`)"
      service = "bfm"
      middleswares = ["gotohttps"]
      [http.routers.bfmRouter.tls]
        certResolver = "prod"
    [http.routers.[redacted3]MainR]
      rule = "Host(`[redacted2].tld2`)"
      service = "[redacted3]MainR"
    [http.routers.[redacted3]Img]
      rule = "Host(`i.[redacted2].tld2`)"
      service = "[redacted3]Img"
    [http.routers.[redacted3]Bots]
      rule = "Host(`bots.[redacted2].tld2`)"
      service = "[redacted3]Bots"


  [http.services]
    [http.services.xeoma.LoadBalancer]
      method = "wrr"
      [[http.services.xeoma.LoadBalancer.servers]]
         url = "http://192.168.0.206:10090/"
         weight = 1
    [http.services.plex.LoadBalancer]
      method = "wrr"
      [[http.services.plex.LoadBalancer.servers]]
         url = "http://192.168.0.207:32400/"
         weight = 1
    [http.services.vrs.LoadBalancer]
      method = "wrr"
      [[http.services.vrs.LoadBalancer.servers]]
         url = "http://192.168.0.213:8080/"
         weight = 1
    [http.services.hass.LoadBalancer]
      method = "wrr"
      [[http.services.hass.LoadBalancer.servers]]
         url = "http://192.168.0.214:8123/"
         weight = 1
    [http.services.nc.LoadBalancer]
      method = "wrr"
      [[http.services.nc.LoadBalancer.servers]]
         url = "http://192.168.0.216/"
         weight = 1
    [http.services.bfm.LoadBalancer]
      method = "wrr"
      [[http.services.bfm.LoadBalancer.servers]]
         url = "http://192.168.0.220/"
         weight = 1
    [http.services.[redacted3]MainR.LoadBalancer]
      method = "wrr"
      [[http.services.[redacted3]MainR.LoadBalancer.servers]]
         url = "http://192.168.0.220:8081/"
         weight = 1
    [http.services.[redacted3]Img.LoadBalancer]
      method = "wrr"
      [[http.services.[redacted3]Img.LoadBalancer.servers]]
         url = "http://192.168.0.220:8082/"
         weight = 1
    [http.services.[redacted3]Bots.LoadBalancer]
      method = "wrr"
      [[http.services.[redacted3]Bots.LoadBalancer.servers]]
         url = "http://192.168.0.220:8083/"
         weight = 1

In your routers section, isn't "middlewares" spelled incorrectly? I realize that's not necessarily a fix for this issue, but it's going to be an issue at some point...

Oops, I suppose it is, good find. Just fixed that :slight_smile:

Happy to help.

[acme] isn't a valid section any longer either. It's like this now:

[certificatesResolvers.sample.acme]
  email = "your-email@your-domain.org"
  storage = "acme.json"
  [certificatesResolvers.sample.acme.httpChallenge]
    # used during the challenge
    entryPoint = "web"

More info here: https://docs.traefik.io/v2.0/https/acme/

And the routers/services/middlewares should be in a dynamic config file. It looks like you have a config.toml set up as a file provider, is that there you have this defined? It shows up as a single file in your post.

I'm using DNS challenge, it certainly seems to be valid?

I've now got another domain (thisismy.technology) added it in, it got a certificate from letsencrypt it's on a router with a working service however still getting 404 not found. Very confused, is it to do with 'tech' being in the TLD?

EDIT: Looks like it might be due to being proxied on cloudflare? then again bfayers.me is proxied on CF and works fine. (I determined this via using the hosts file on my desktop and pointing thisismy.technology to the IP of my reverse proxy. and this also worked for my bfayers.tech domain. :thinking:)

EDIT2: More testing! After clearing the CF cache for my new, thisismy.technology, domain it's working fine. This does however not fix my bfayers.tech domain.

Okay, all solved now. My acmev2.json had bfayers.me sans bfayers.tech for some reason so there wasn't a proper SSL/TLS cert issued for it. Problem solved removed the sans bit from acmev2.json, restarted traefik went to bfayers.tech all generated correctly and sorted now :slight_smile: