Hi,
First-time user here.
Can't seem to make traefik running either with or without TLS, getting 404 for both dashboard and app, firefox and curl, http and https.
docker-compose.yaml:
version: '3.8'
services:
ingress:
image: traefik:v2.6
command: --providers.docker \
--providers.file.directory=/etc/traefik/ \
--providers.file.watch=true
ports:
- '80:80'
- '443:443'
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./cert.pem:/etc/ssl/cert.pem
- ./key.pem:/etc/ssl/key.pem
- ./config:/etc/traefik/
app:
...
traefik.yaml:
entryPoints:
web:
address: ":80"
# http:
# redirections:
# entryPoint:
# to: websecure
# scheme: https
# permanent: true
websecure:
address: ":443"
http:
tls: {}
http:
routers:
app:
entrypoints:
- websecure
- web
rule: Host(`app.example.com`)
service: app
middlewares:
- app
# tls: true
dashboard:
rule: (PathPrefix(`/api`) || PathPrefix(`/dashboard`))
service: api@internal
# tls: true
entrypoints:
- websecure
- web
middlewares:
app:
stripPrefix:
prefixes:
- "/app/"
tls:
certificates:
- certFile: /etc/ssl/cert.pem
keyFile: /etc/ssl/key.pem
logs:
level: DEBUG
accessLog: {}
api:
debug: true
dashboard: true
insecure: true
Traefik debug output is not very helpful:
time="2022-03-15T15:16:20Z" level=info msg="Configuration loaded from file: /etc/traefik/traefik.yaml"
IP - - [15/Mar/2022:15:18:30 +0000] "GET / HTTP/1.1" - - "-" "-" 1 "-" "-" 0ms
IP - - [15/Mar/2022:15:18:49 +0000] "GET /dashboard/ HTTP/2.0" - - "-" "-" 2 "-" "-" 0ms