मैंने docker-compose का उपयोग करके docker के अंतर्गत Traefik को स्थापित किया है और मैंने कुछ अनुरोधों को पुनर्निर्देशित करने के लिए नियमों में ..tl फ़ाइल का उपयोग किया है।
ट्रैफ़िक एक ही पीसी (यह एक Qnap) पर स्थापित अन्य डॉकटर (एसएसएल का उपयोग करके) के साथ अच्छी तरह से काम करता है
मैं चाहता हूँ कि यह सिर्फ एक पुनर्निर्देशन की तरह है: https://router.domain.com यहाँ मेरे नियम हैं
########################### 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 ()
क्या कोई मेरी मदद कर सकता हैं ? अग्रिम में धन्यवाद
डेनिस