【发布时间】:2020-02-18 03:09:45
【问题描述】:
我已阅读文档,但不知道如何在不涉及 Docker 的情况下配置 Traefik v2 以替换 Nginx 作为网站(虚拟主机)的反向代理。理想情况下也会有 let'sencrypt https。
我有一个在 http://127.0.0.1:4000 运行的服务,我想将其反向代理到 http://myhost.com:80
这是我目前想出的配置:
[Global]
checkNewVersion = true
[log]
level = "DEBUG"
filePath = "log-file.log"
[accessLog]
filePath = "log-access.log"
bufferingSize = 100
[entrypoints]
[entrypoints.http]
address = ":80"
[http]
[http.routers]
[http.routers.my-router]
rule = "Host(`www.myhost.com`)"
service = "http"
entrypoint=["http"]
[http.services]
[http.services.http.loadbalancer]
[[http.services.http.loadbalancer.servers]]
url = "http://127.0.0.1:4000"
【问题讨论】:
-
我解决了仪表板 404 并编写并完成了没有 docker 的部署教程。结帐:adapttive.com/blog/deploying-node-js-app-with-pm-2-and-traefik
标签: reverse-proxy traefik