Hi I am new to traefik. Firstly here is my docker compose file I use in my local portainer.I was experimenting nginx proxy manager and traefik and My crt and key were working with nginx proxy manager also I can see the dashboard of the traefik.
Also here is the error shown in the browser
ERR_SSL_UNRECOGNIZED_NAME_ALERT
docker-compose
services:
traefik:
container_name: traefik
image: traefik:latest
restart: unless-stopped
ports:
# The HTTP port
- "80:80"
# The HTTPS port
- "443:443"
# The Traefik port
- "8080:8080"
networks:
- proxy
volumes:
- /home/traefik/:/etc/traefik/
- /home/traefik/conf:/etc/traefik/conf/
- /home/traefik/certs:/etc/traefik/certs/
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
proxy:
/home/traefik/dynamic_conf.yaml
tls:
certificates:
- certFile: /etc/traefik/cert.crt
keyFile: /etc/traefik/cert.key
stores:
default:
defaultCertificate:
certFile: /etc/traefik/cert.crt
keyFile: /etc/traefik/cert.key
/home/traefik/traefik.yaml
global:
checkNewVersion: false
sendAnonymousUsage: false
log:
level: DEBUG
format: common
accessLog:
format: common
api:
dashboard: true
insecure: true
entryPoints:
web:
address: :80
http:
redirections:
entryPoint:
to: websecure
scheme: https
websecure:
address: :443
providers:
docker:
exposedByDefault: false
file:
directory: /etc/traefik
watch: true
For Test Purposes I was trying nginx then I want to do it with portainer
services:
nginx:
container_name: nginx
image: nginx:latest
networks:
- traefik_proxy
labels:
- traefik.enable=true
- traefik.http.routers.nginx.entrypoints=websecure
- traefik.http.routers.nginx.tls={}
- traefik.http.routers.nginx.rule=Host(`example.host.com`)
- traefik.http.routers.nginx.service=nginx
- traefik.http.services.nginx.loadbalancer.server.port=80
networks:
traefik_proxy:
external: true
Location of the certification files -> /home/traefik/certs
Logs
2024-12-20T16:48:49Z DBG github.com/traefik/traefik/v3/pkg/tls/tlsmanager.go:228 > Serving default certificate for request: "example.host.com"
2024-12-20T16:48:49Z DBG github.com/traefik/traefik/v3/pkg/tls/tlsmanager.go:228 > Serving default certificate for request: "example.host.com"
2024-12-20T16:48:49Z DBG log/log.go:245 > http: TLS handshake error from my-ip:4851: tls: no certificates configured
2024-12-20T16:48:49Z DBG log/log.go:245 > http: TLS handshake error from my-ip:4047: tls: no certificates configured