You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

ProxyPassMatch反向引用问题:请求路径转发不符合预期

Apache ProxyPassMatch 路径匹配问题解决方案

你的问题出在正则表达式的捕获分组上,当前配置的$1会包含完整的map/maps/example/live/data,导致转发路径多了开头的map/。

只需调整正则,把map/放在捕获组之外,只捕获需要转发的路径部分:

ProxyPassMatch ^/map/(maps/[^/]*/live/.*) http://127.0.0.1:8100/$1

验证逻辑

当请求为www.website.com/map/maps/example/live/data时:

  • 正则^/map/(maps/[^/]*/live/.*)会匹配路径开头的/map/,并将后续的maps/example/live/data捕获为$1
  • 最终转发地址即为http://127.0.0.1:8100/maps/example/live/data,完全符合需求

内容的提问来源于stack exchange,提问作者Firav

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.30 00:22:04