V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
la0wei
V2EX  ›  问与答

反向代理传递用户给服务器?

  •  
  •   la0wei · 2018-08-13 16:29:55 +08:00 · 1206 次点击
    这是一个创建于 2082 天前的主题,其中的信息可能已经有所发展或是发生改变。

    使用 docker 运行 rtorrent+rutorrent。

    指定端口时,使用-p 127.0.0.1:8080:80,限制只能本地访问,然后通过 caddy 反代 8080 端口以使用 https。

    即 浏览器 https------->caddy------>docker

    同时,rtorrent 没有用户管理功能,我在 caddy 配置文件中加了 basicauth admin 111111 (主机内无 admin 用户,docker 容器内也没有)

    然而 rutorrent 的 web 页面显示日志报错

    看起来是 caddy 把 basicauth 中的用户 admin 传递给了 docker 中的 nginx ( docker 中 nginx 以 www-data 用户运行,rtorrent 使用 root 运行),nginx 又传给 rtorrent 和 rutorrent,造成异常

    这是 nginx 的特性还是什么原因?

    [13.08.2018 15:13:09] WebUI started. [13.08.2018 15:13:24] 网页服务器执行用户对 torrents 存放文件夹 没有 读 /写 /执行 权限. 你将无法从 ruTorrent 添加 torrents. (/downloads/.rutorrent/users/admin/torrents)

    [13.08.2018 15:13:24] 网页服务器执行用户对配置存储文件夹没有 读 /写 /执行 权限. ruTorrent 设置无法被保存. (/downloads/.rutorrent/users/admin/settings)

    [13.08.2018 15:13:24] rTorrent 执行用户 必须对 torrents 存放文件夹有 读 /写 权限. 你将无法从 ruTorrent 添加 torrents. (/downloads/.rutorrent/users/admin/torrents)

    [13.08.2018 15:13:24] rTorrent 执行用户 必须对配置存放文件夹有 读 /写 /执行 权限 (/downloads/.rutorrent/users/admin/settings)

    [13.08.2018 15:13:24] history: 插件将不会工作. rTorrent 执行用户不能访问外部程序 (php).

    [13.08.2018 15:13:24] rss: 插件将不会工作. rTorrent 执行用户不能访问外部程序 (php).

    [13.08.2018 15:13:24] rutracker_check: 插件将不会工作. rTorrent 执行用户不能访问外部程序 (php). [13.08.2018 15:13:24] retrackers: 插件将不会工作. rTorrent 执行用户不能访问外部程序 (php). [13.08.2018 15:13:24] xmpp: 插件将不会工作. rTorrent 执行用户不能访问外部程序 (php).

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5132 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 03:47 · PVG 11:47 · LAX 20:47 · JFK 23:47
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.