Angus007
V2EX  ›  站长

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

  •  
  •   Angus007 · May 22, 2024 · 1600 views
    This topic created in 726 days ago, the information mentioned may be changed or developed.
    后端的项目的 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
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1222 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 23:24 · PVG 07:24 · LAX 16:24 · JFK 19:24
    ♥ Do have faith in what you're doing.