如何将 Qbittorrent webui 端口放在 https Apache2 服务器后面?

How to put Qbittorrent webui port behind a https Apache2 server?

所以基本上,我有一个带有 https 的 apache2 服务器,其中我 运行 一些应用程序

我正在尝试使用 mod_proxy 将所有流量代理到 url example.com/qb[::1]:qb-webui-port

所以在/etc/apache2/mods-enabled/proxy.conf,我写道:

ProxyRequests Off
<proxy *>
AddDefaultCharset off
Order Allow,Deny
Allow from all
</proxy>
ProxyPass /transmission http://[::1]:9091/transmission
ProxyPassReverse /transmission http://[::1]:9091/transmission
ProxyVia On

ProxyPass /qb http://[::1]:8112
ProxyPassReverse /qb http://[::1]:8112

以上是我对传输的类似配置,我打算对Qbittorrent做同样的技巧。 但它只从 example.com/qb 返回普通的 html。 在 firefox 控制台中,我注意到有一些针对 example.com/cssexample.com/script 等的请求。 这让我很困惑。

任何人都可以对此提供一些见解吗? 谢谢

您漏掉了地址的末尾斜线。 这是我的配置文件。我添加了一个 RewriteRule 以防我输入 URL 而没有尾部斜杠。有了这些配置,我不需要修改任何其他东西来让 qb 反向代理工作。 我使用“/torrent/ 子目录访问我的 qbittorrent webUI,它正在侦听 8080 端口,因此您应该修改它以使您的安装完全正常运行。

    # Para qbittorrent      
    RewriteEngine on
    RewriteRule             ^/torrent$      "/torrent/" [R]
    ProxyPass               /torrent/       http://127.0.0.1:8080/
    ProxyPassReverse        /torrent/       http://127.0.0.1:8080/