![HAProxy 基于路径路由网页;网页资源无法加载](https://linux22.com/image/790606/HAProxy%20%E5%9F%BA%E4%BA%8E%E8%B7%AF%E5%BE%84%E8%B7%AF%E7%94%B1%E7%BD%91%E9%A1%B5%EF%BC%9B%E7%BD%91%E9%A1%B5%E8%B5%84%E6%BA%90%E6%97%A0%E6%B3%95%E5%8A%A0%E8%BD%BD.png)
我有以下内容haproxy.cfg
:
global
stats socket /var/run/api.sock user haproxy group haproxy mode 660 level admin expose-fd listeners
log stdout format raw local0 info
defaults
mode http
timeout client 10s
timeout connect 5s
timeout server 10s
timeout http-request 10s
log global
frontend stats
bind *:8404
stats enable
stats uri /
stats refresh 10s
frontend myfrontend
bind :80
use_backend infra-jaeger if { path /infra/jaeger } || { path_beg /infra/jaeger/ }
backend infra-jaeger
http-request replace-path /infra/jaeger(/)?(.*) /\2
server s1 host.docker.internal:8090 check
这似乎有效(jaeger 页面加载),但是所有页面资源都无法加载,因为它们仍在尝试命中/static/jaeger/resource
(例如)插入/infra/jaeger/static/jaeger/resource
:
有什么方法可以让它工作吗?