apache - rsync TLS 代理与 Apache:“rsync:服务器发送 'HTTP/1.1 400 Bad Request' 而不是问候”
问题描述
man rsyncd.conf
说:
如果您将 rsync 放在 SSL 代理后面,您也可以使用 SSL/TLS 加密。
SSL/TLS 守护程序设置 当设置 rsync 守护程序以通过 SSL/TLS 访问时,您需要配置代理(例如 haproxy 或 nginx)作为处理加密的前端。
您应该限制对 backend-rsyncd 端口的访问,只允许代理连接。如果它与代理在同一主机上,那么将其配置为仅在 localhost 上侦听是个好主意。
如果您的代理支持发送该信息,您应该考虑打开代理协议参数。下面的示例假定已启用此功能。
我尝试在 Apache 上设置一个ProxyPass
(反向代理)来监听端口 873(标准 rsync 端口)并转发到我在端口 874 上运行的本地 rsync 实例;但是, rsync 给出:
rsync: server sent "HTTP/1.1 400 Bad Request" rather than greeting
rsync 文档给出了一个 nginx 配置示例:
An example nginx proxy setup is as follows:
stream {
server {
listen 874 ssl;
listen [::]:874 ssl;
ssl_certificate /etc/letsencrypt/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/example.com/privkey.pem;
proxy_pass localhost:873;
proxy_protocol on; # Requires "proxy protocol = true"
proxy_timeout 1m;
proxy_connect_timeout 5s;
}
}
也许我没有正确地解释和翻译到 Apache。这个 nginx 配置似乎侦听端口 874 并转发到 873。(我认为我正在做相反的事情。)Apache 似乎没有类似的proxy_protocol on
选项,或者是吗?我已经尝试过proxy protocol = true
,并且= false
在我的/etc/rsyncd.conf
. Rsync 请求以一种方式超时,而另一种则给出“而不是问候”错误。
解决方案
推荐阅读
- kubernetes - 如果我有一个 PVC 在所有 statefulset 副本之间共享相同的卷,是否存在任何技术问题?
- c# - JVM 的 JMC+JFR 是否有 C#/.NET 等效项,用于在生产中进行连续分析?
- c# - foreach 循环中的 Component.InvokeAsync 不起作用
- azure - 部署 Azure 容器而不运行它们
- maven - Jenkins maven projet 构建在测试期间在 fork 上失败
- javascript - 无法设置未定义的属性 - AuthLogin JS
- javascript - TypeError: req.flash is not a function -- (NodeJs) (connect-flash) -- 我无法打开页面
- python - 在 Django 的 TestCase 中测试并发客户端
- python - 一个基本的八位数字符串到八位二进制数
- arrays - 尝试使用 React Hooks 为一个状态实现多个值