Traefik负载均衡器到外部服务器

时间:2019-07-30 08:10:28

标签: proxy reverse-proxy traefik

如何使用traefik对外部IP地址进行负载平衡?在这种实现上,我真的很陌生,我很困惑。 我有一个本地网络,并且有一个运行在192.168.1.39:3000上的单个Nginx Web服务器 我有一个代理服务器(traefik):192.168.1.157 我有一个Firefox客户端,其代理设置为192.168.1.157 当我尝试转到Nginx服务器时,它给了我404页面未找到错误。 我没有dns或类似的东西,我只想设置像服务器这样的HAproxy。

[web]
address = ":8080"
defaultEntryPoints = ["http", "https"]
[entryPoints]
  [entryPoints.http]
  address = ":80"
  [entryPoints.https]
  address = ":443"
    [entryPoints.https.tls]

[file]

[backends]
 [backends.backend1]

 [backends.backend1.servers]
   [backends.backend1.servers.server0]
   url = "http://192.168.1.39:3000"

[frontends]
  [frontends.frontend1]
  entryPoints = ["http"]
  backend = "backend1"
  passHostHeader = true
  [frontends.frontend1.routes]
  [frontends.frontend1.routes.route0]
    rule = "Host: 192.168.1.157:3000"

0 个答案:

没有答案