Hello,
I am new to Traefik and I have been trying to use it to set up a reverse proxy for an academic project.
The problem is I keep running into a "404 not found" and can't even access the dashboard.
Here is the Traefik section in my docker-compose.yml file:
reverse:
image: traefik:v2.0
ports:
- "443:443"
- "8080:8080"
- "80:80"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./letsencrypt:/letsencrypt
command:
- "--api=true"
- "--api.dashboard=true"
- " --api.insecure=true"
- "--api.debug=true"
- "--providers.docker=true"
- "--entrypoints.websecure.address=:443"
- "--entrypoints.dashboard.address=:8080"
- "--certificatesresolvers.mydnschallenge.acme.dnschallenge=true"
- "--certificatesresolvers.mydnschallenge.acme.dnschallenge.provider=cloudflare"
- "--certificatesresolvers.mydnschallenge.acme.email=email@example.com"
- "--certificatesresolvers.mydnschallenge.acme.storage=/letsencrypt/acme.json"
- "--log.level=DEBUG"
environment:
CF_API_EMAIL: $CF_API_EMAIL
CF_API_KEY: $CF_API_KEY
labels:
- "traefik.http.routers.api.rule=Host(`example.com`)"
- "traefik.http.routers.api.entrypoints=dashboard"
- "traefik.http.routers.api.rule=PathPrefix(`/api`) || PathPrefix(`/dashboard`)"
- "traefik.http.routers.api.service=api@internal"
I am performing a DNS Challenge that is succeeding, so I don't think that's the problem.
I followed a tutorial that puts all the labels and commands into the docker compose and therefore have no Traefik.toml file
Is it possible that the problem lies there?
Cheers