所以基本上,我有一个带有https的apache2服务器,我在其中运行一些应用程序
我正在尝试使用mod_proxy来代理所有的流量到网址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。在火狐控制台上,我注意到有一些对example.com/css,example.com/script等的请求,这让我很困惑。
有人能提供一些关于这个问题的见解吗?谢谢。
发布于 2021-02-09 04:06:40
您遗漏了地址上的尾部斜杠。这是我的配置文件。我添加了一个RewriteRule,以防我输入没有尾随斜杠的URL。有了这些配置,我不需要修改任何其他东西来让qb反向代理工作。我使用"/torrent/ subdir“来访问我的qbittorrent webUI,它正在监听8080端口,所以你应该修改它以使你的安装完全正常工作。
# Para qbittorrent
RewriteEngine on
RewriteRule ^/torrent$ "/torrent/$1" [R]
ProxyPass /torrent/ http://127.0.0.1:8080/
ProxyPassReverse /torrent/ http://127.0.0.1:8080/https://stackoverflow.com/questions/64565110
复制相似问题