【问题标题】:HAProxy - Cannot change path in backend serverHAProxy - 无法更改后端服务器中的路径
【发布时间】:2021-10-04 19:27:57
【问题描述】:

您好,我有这个问题:

我需要重定向我的后端服务器,在 ip 和端口定义之后使用特定的上下文......

按照我的例子。

前端 my-https

绑定 *:443 ssl crt /mypath/haproxy/mycer.pem 日志格式“%ci:%cp [%t] %ft %b/%s %Tw/%Tc/%Tt %B %ts %ac/%fc/%bc/%sc/%rc %sq/% bq %[var(xxxxxxxxxxxx)]”

use_backend bk_1 if { path_beg /pippo }

后端 bk_1 平衡循环 服务器 s1 xxx.xxx.xxx.xxx:3101/services ssl ca-file /etc/haproxy/cer.pem 检查权重 99 server s2 xxx.xxx.xxx.xxy:3101/services ssl ca-file /etc/haproxy/cer.pem check weight 01

我的后端路径不同,我该如何解决?

谢谢

【问题讨论】:

    标签: path backend haproxy


    【解决方案1】:

    解决了,

    只需在后端配置部分插入以下行:

    模式http
    http-request set-path /path/subpath/and_so_on

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-04-19
      • 1970-01-01
      • 1970-01-01
      • 2013-09-02
      • 2022-10-13
      • 1970-01-01
      相关资源
      最近更新 更多