V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Angus007
V2EX  ›  站长

Traefik 反代求助,折腾一天都没搞好

  •  
  •   Angus007 · 12 天前 · 244 次点击
    后端的项目的 url 为 10.0.0.2/share ,所有子路径都是/share 下面,现在需要访问根路径时重定向到/share/Index ,访问其他路径时为/*,即隐藏/share 直接显示为 abc.com/*,下面是一个 caddy 的示例,求大佬们帮俺写个 traefik 的示例。

    二级域名 {
    @notShare {
    not path /share
    }
    rewrite @notnotShare /share{uri}
    reverse_proxy localhost:8080
    }
    redir / /share/Index
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1894 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 16:22 · PVG 00:22 · LAX 09:22 · JFK 12:22
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.