Auston

怎么用 caddy v2 反代 ip:port/path 格式服务

  •  
  •   Auston · Jan 24, 2024 · 2279 views
    This topic created in 1013 days ago, the information mentioned may be changed or developed.
    搭建了一个 xui web 服务,必须带后面的路径才能访问,如果用 caddy 反带,配置文件应该写?网上搜了很多没有搜到想要的答案。
    5 replies  •  2024-01-25 00:16:44 +08:00
    xxx027
    xxx027
    Jan 24, 2024❤️1
    1
    用 handle

    www.domain.tld {
    encode zstd gzip
    handle /path {
    reverse_proxy localhost:port
    }
    }

    如果你英文不太好,建议是不要用 caddy ,英文可以的话能直接去官方论坛问,会有其他人帮你解答的,你在其他地方想得到答案就比较麻烦了
    OutOfMemoryError
    OutOfMemoryError
    Jan 24, 2024
    2
    @xxx027 #1 好奇的问一句,caddy 这个东西真的能大规模商用了么。。。
    xxx027
    xxx027
    Jan 24, 2024
    3
    @OutOfMemoryError 大概不行吧,文档真的很省略,要去官方论坛找答案。自己试过没问题的功能倒是可以放心用,我个人的站全是用 caddy 的,没有很复杂的功能
    Auston
    Auston
    OP
    Jan 24, 2024
    4
    @xxx027 感谢大佬指点!我去试一下
    binghe
    binghe
    Jan 25, 2024
    5
    reverse_proxy /api {
    to 127.0.0.1:8888
    }
    只匹配 api 路径。
    ---
    reverse_proxy /api/* {
    to 127.0.0.1:8888
    }
    匹配 api 下的所有子路径
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5627 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 03:03 · PVG 11:03 · LAX 19:03 · JFK 22:03
    ♥ Do have faith in what you're doing.