我想在我的服务器上用webui设置utorrent。
Utorrentbuild立了自己的networking服务器,默认情况下,它监听端口8080。
然后通过访问example.com:8080/gui访问用户界面
我的目标是有subdomain.server.com使用反向代理。
当我发现有些URL被硬编码为/ gui / *,这当然会破坏事情。
我现在试图从使用mod重写请求中删除该初始/ gui,但由于某种原因,它不工作。
我可以访问该网站(我得到的utorrent加载屏幕),但如果我检查我的日志,我看到/gui/token.html所有请求得到404未find响应,/ /token.html工作得很好,如果我手动尝试虽然。
我已经尝试将重写移动到代理,但也不起作用。
这是我的虚拟主机文件:
<IfModule mod_ssl.c> <VirtualHost *:443> ServerName subdomain.example.com RewriteEngine on RewriteRule ^/gui(/?)(.*)$ /$2 ProxyRequests off ProxyPass / http://127.0.0.1:8080/gui/ ProxyPassReverse / http://127.0.0.1:8080/gui/ RequestHeader set Authorization "Basic YWRtaW46" ErrorLog /var/log/apache2/utorrent-error.log CustomLog /var/log/apache2/utorrent-access.log common SSLEngine on SSLCertificateFile /etc/ssl/certs/*.domain.crt SSLCertificateKeyFile /etc/ssl/private/*.domain.key SSLCACertificateFile /etc/ssl/certs/domain-ca-ssl.crt BrowserMatch "MSIE [2-6]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown </VirtualHost> <proxy http://127.0.0.1:8080/gui/*> Order deny,allow Deny from all Allow from all AuthName subdomain.example.com AuthType Basic AuthUserFile /etc/utorrent/.htpasswd Require valid-user </proxy> </IfModule>
事实certificate,这就像在重写中添加[PT]标志一样简单
像添加了PT开关的魅力一样工作
<VirtualHost *:80> ServerName utorrent.yourdomain.com ProxyPreserveHost on RewriteEngine on RewriteRule ^/gui(/?)(.*)$ /$2 [PT] ProxyPass / http://127.0.0.1:8080/gui/ ProxyPassReverse / http://127.0.0.1:8080/gui/ </VirtualHost>