自2天以来,我一直在尝试进行重定向(HTTPS)。
我想使用我的URL通过我的URL(并重定向到HTTPS)使用duckdns访问内部URL。 但是,我看到重定向有效,但过一会儿就会超时,当然是在到达内部资源期间。 这是我的书,有人可以帮助我吗?
当我在局域网中使用URL时,资源就可以了。
这是代码:
# Global configuration
logLevel = "DEBUG"
InsecureSkipVerify = true
defaultEntryPoints = ["http", "https"]
#Log
[traefikLog]
filePath = "/etc/traefik/traefik.log"
[accessLog]
filePath = "/etc/traefik/access.log"
# Entrypoints configuration
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
# Let's Encrypt support
[acme]
email = "xxxxx"
storage = "/etc/traefik/letsencrypt.json"
#caServer = "https://acme-staging-v02.api.letsencrypt.org/directory"
entryPoint = "https"
onHostRule = true
onDemand = false
[acme.dnsChallenge]
provider = "duckdns"
delayBeforeCheck = 0
[[acme.domains]]
main = « xxxx.duckdns.org"
# Rules configs
[file]
watch = true
filename = "/etc/traefik/rules.toml"
# Enable API and dashboard
[api]
dashboard = true
这里是rules.toml:
[backends]
[backends.backend1]
[backends.backend1.servers]
[backends.backend1.servers.server1]
url = "http://xxx.xxx.xx.xx:3000"
weight = 1
[frontends]
[frontends.frontend1]
entryPoints = ["https", "http"]
backend = "backend1"
passHostHeader = true
[frontends.frontend1.routes]
[frontends.frontend1.routes.route1]
rule = "Host:xxx.duckdns.org"
谢谢。