Hello all,
I am still a complete newbie when it comes to Traefik (v 2.3). Via Youtube (https://youtu.be/g2aIYI7Rxas) I found a tutorial how to set up a reverse proxy connection to a non Docker environment (e.g. to a LXC container under Proxmox or so...) so that Traefik can pull a certificate for this external host via Let's Encrypt and then make this service available on the Internet. Unfortunately I always get a 404 error message.
Additionally I would be interested in how to remove a Let's Encrypt certificate in Traefik and renew it via force.
Enclosed my traefik.yml and middleware.yml
traefik.yml:
##START
global:
checkNewVersion: true
sendAnonymousUsage: true
api:
dashboard: true
debug: true
log:
### Default Level ist ERROR. Alternative Log-Level lauten (je weiter rechts desto mehr Info) PANIC, FATAL, ERROR, WARN, INFO, DEBUG
level: DEBUG
filePath: "/traefik.log"
entryPoints:
http:
address: "0.0.0.0:80"
https:
address: "0.0.0.0:443"
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
network: internet
exposedByDefault: false
file:
filename: /middleware.yml
certificatesResolvers:
le:
acme:
email: cert@examle.com
storage: acme.json
tlsChallenge: {}
##EOF
middleware.yml:
##START
http:
middlewares:
https-redirect:
redirectScheme:
scheme: https
default-headers:
headers:
CustomFrameOptionsValue: "SAMEORIGIN"
sslRedirect: true
browserXssFilter: true
contentTypeNosniff: true
forceSTSHeader: true
stsSeconds: 315360000
stsIncludeSubdomains: true
stsPreload: true
# Beispiel fuer externe Dienste
routers:
dokuwiki: # Tausche den Namen gegen etwas sprechendes aus
entryPoints:
- https
rule: "Host(`wiki.example.com`)"
service: "dokuwiki" # Den Namen am besten hnlich zu dem oben setzen
tls:
certresolver: le
nextcloud:
entryPoints:
- https
rule: "Host(`cloud.example.com`)"
service: "nextcloud"
tls:
certresolver: le
services:
dokuwiki: # Ich verwende hier den gleiche Namen wie bei routers
loadBalancer:
servers:
- url: "http://192.168.192.171" # Auf die richtige URL anpassen. Ggf. nat rlich mir Port
nextcloud:
loadBalancer:
servers:
- url: "https://192.168.192.172"
matomo-headers:
headers:
sslRedirect: true
browserXssFilter: true
contentTypeNosniff: true
forceSTSHeader: true
stsSeconds: 315360000
stsIncludeSubdomains: true
stsPreload: true
tls:
options:
myTLSOptions:
minVersion: VersionTLS12
##EOF
Am grateful for any suggestion
kind regards H-BLOGX