Minimal config parameters for Traefik v2

Hi,

I'm a bit new to Traefik, and I was checking documentation and some resources. I was able to set up a few services, with HTTPs too, using the Docker provider and labels in a docker-compose file.

Now I want to do the same, but this time I'm trying to use a Traefik TOML file. I've tried setting up routers, services and all the nuts and bolts as per the Traefik documentation but I can't seem to get it working.

I keep getting 404s, and I am served with a specific message

404 page not found

I'm interested in knowing what is a minimal config file that I can use to ensure that Traefik and other things like a firewall or smth are working correctly, then I can concentrate on my infrastructure.

defaultEntryPoints = ["web",  "websecure"]
[entryPoints]
  [entryPoints.web]
    address = ":80"

  [entryPoints.websecure]
    address = ":443"

[api]
  insecure = true
  dashboard = true

[log] 
[accessLog]

this is my current config file. In this respect, I have two questions.

  1. Should I be able to connect to the dashboard and API using a domain name like this (domain.com) where I have mapped the A record to the vm at hand.
  2. Should I be able to connect to the dashboard if the (domain.com) is not mapped to the server, but (sub.domain.com) is mapped. I want to connect through sub.domain.com/dashboard/

Thank you

Hello,

defaultEntryPoints is a Traefik v1 option, not supported in Traefik v2.

Why do you want to use files?