idealhs
V2EX  ›  问与答

求教,对于一些本身不支持 baseurl/prefix 的 Web 应用来说,如何简单地配置反向代理?

  •  
  •   idealhs · Nov 24, 2022 · 1126 views
    This topic created in 1290 days ago, the information mentioned may be changed or developed.

    先举个支持的例子:
    为 Jellyfin 配置 nginx ,只要在 Jellyfin 里设置 BaseUrl 为 jellyfin ,即可将原先的
    http://server:xxxx/web/请求改为 http://server/jellyfin/web/
    nginx 中简单配置 proxy_pass 即可

    NextCloud 等等的 PHP 应用,也都在文档中提供了配置的方式

    那么对于不支持配置 baseurl/prefix 的 web 应用来说,假设 nginx 配置了 proxy_pass 后,本来的
    server/xxxapp/static 请求就会依然使用 server/static ,导致访问不到 static 下的资源

    求教,这种情况下,是否有方法在 nginx 下做一些配置,使得代理生效呢

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   879 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 21:55 · PVG 05:55 · LAX 14:55 · JFK 17:55
    ♥ Do have faith in what you're doing.