|
由于我使用了nginx替换uhttpd
并且设置了只能用https访问openwrt
在openwrt V19.07.7中在nginx.conf中进行如下配置
是可以正常通过nginx转发aria2在http/https协议下的jsonrpc请求。
location ^~ /jsonrpc/ { #aria2反向代理,webui-aria2中需要取消"启用 SSL/TLS 加密"选项方可连接
proxy_http_version 1.1;
add_header Front-End-Https on;
proxy_set_header Connection "";
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:6800/jsonrpc;
proxy_pass_header X-Transmission-Session-Id;
}
但是,但是,但是
当我使用最新的V21.02.0-RC2 编译后,用同样的配置就不行了。
我试过将https改为http下又能正常代理。
在自编译v21.02.0-rc2时,所有编译配置与V19.07.7也是一模一样的。
运行起来发现v21.02.0-rc中的nginx是1.19.6版本,v19.07.7好像是nginx 1.18
现在怀疑的就是nginx升级导致的(当然也可能是aria2升级导致,最值得怀疑的就是nginx)
各位大佬,怎么才能在通过nginx1.19.6,在https模式下通过代理访问aria2的jsonrpc呢?
我经常在外网访问家里路由器,所以还是想只开启https访问.
这可能只是一个设置问题,但我搞了好几天也没搞定。各种方式都尝试过。
|
|