【问题标题】:Jetty Service behind TraefikTraefik 背后的码头服务
【发布时间】:2019-05-01 15:33:34
【问题描述】:

我有一个使用 Jetty 提供 Web 服务的供应商提供的软件包。当我将 Traefik 放在它前面并访问前端时,我会被重定向到后端 URL。例如,前端 URL 是 https://program.example.com/,后端(软件) URL 是 http://192.168.1.1:8088/,当我浏览到 https://program.example.com/ 时,我会自动重定向到 http://192.168.1.1:8088/。想法?

[backends.sample]
    [backends.sample.servers.sample]
        url = "http://192.168.1.1:8088/" 

[frontends.sample]
       backend = "sample"
[frontends.sample.routes.sample]
       rule = "Host:program.sample.com"
       passHostHeader = true
       useXForwardedFor = true
[frontends.sample.redirect]
       entryPoint = "https"
       permanent = true

【问题讨论】:

    标签: traefik


    【解决方案1】:

    我想通了。

    我的“passHostHeader”放错了地方。

    [frontends.sample]
       backend = "sample"
       passHostHeader = true
    [frontends.sample.routes.sample]
       rule = "Host:program.sample.com"
       useXForwardedFor = true
    [frontends.sample.redirect]
       entryPoint = "https"
       permanent = true
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-03-18
      • 1970-01-01
      • 2021-02-08
      • 1970-01-01
      • 2012-11-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多