1

Я установил Traefik в Docker, используя docker-compose, и использовал файл rules.toml, чтобы перенаправить некоторый запрос.

Trafick хорошо работает с другим докером (использующим SSL), установленным на том же ПК (это Qnap)

То, что я хочу, это просто перенаправить как: https://router.domain.com Вот мой rules.toml

########################### BACKENDS ####################################
[backends]
##### Router
[backends.backend-router]
[backends.backend-router.servers]
[backends.backend-router.servers.server-router-ext]
url = "http://192.168.1.1:4443"   ### https of router is set to 4443
weight = 0

#########################################################################
########################## FRONTENDS ####################################
[frontends]
##### Router
[frontends.frontend-router]
backend = "backend-router"
passHostHeader = true
[frontends.frontend-router.routes]
[frontends.frontend-router.routes.route-router-ext]
rule = "Host:router.domain.com"

А вот и мой файл traefik.toml

InsecureSkipVerify = true
defaultEntryPoints = ["https", "http"]

# WEB interface of Traefik - it will show web page with overview of frontend and backend configurations
[api]
  entryPoint = "traefik"
  dashboard = true
  address = ":8080"
  usersFile = "/shared/.htpasswd"

# Force HTTPS
[entryPoints]
  [entryPoints.http]
  address = ":80"
    [entryPoints.http.redirect]
    entryPoint = "https"
  [entryPoints.https]
  address = ":443"
    [entryPoints.https.tls]

##########################################################################
# file rules.toml 
[file]
  watch = true
  filename = "/etc/traefik/rules.toml"

#############################
# Let's encrypt configuration
[acme]
email = "info@mymail.com"
storage="/etc/traefik/acme/acme.json"
entryPoint = "https"
acmeLogging=true
onDemand = false #create certificate when container is created
[acme.dnsChallenge]
  provider = "cloudflare"
  delayBeforeCheck = 0
InsecureSkipVerify = true
defaultEntryPoints = ["https", "http"]

# WEB interface of Traefik - it will show web page with overview of frontend and backend configurations
[api]
  entryPoint = "traefik"
  dashboard = true
  address = ":8080"
  usersFile = "/shared/.htpasswd"

# Force HTTPS
[entryPoints]
  [entryPoints.http]
  address = ":80"
    [entryPoints.http.redirect]
    entryPoint = "https"
  [entryPoints.https]
  address = ":443"
    [entryPoints.https.tls]

##########################################################################
# file rules.toml dove stanno i siti che non sono presenti nei vari docker
[file]
  watch = true
  filename = "/etc/traefik/rules.toml"

#############################
# Let's encrypt configuration
[acme]
email = "info@mymail.com"
storage="/etc/traefik/acme/acme.json"
entryPoint = "https"
acmeLogging=true
onDemand = false #create certificate when container is created
[acme.dnsChallenge]
  provider = "cloudflare"
  delayBeforeCheck = 0

Когда я пытаюсь получить доступ к Google Chrome, это:

the server responded with a status of 502 ()

Кто-нибудь может мне помочь? заранее спасибо

Денис

0