我正在尝试设置韵律以在 https 上使用 candy。我已尝试配置 SSL 和列出的所有步骤以使其正常工作,但出于某种原因,当我尝试 <a href="https://servername.com:5280/http-bind" rel="noreferrer noopener nofollow">https://servername.com:5280/http-bind</a>
时它超时,韵律日志中出现以下内容:
server.lua: accepted new client connection from servername:23366 to 5280
server.lua: accepted new client connection from servername:10667 to 5280
server.lua: client servername:23366 read error: closed
server.lua: closed client handler and removed socket from list
当我尝试通过 http 执行相同操作时,它起作用了: <a href="http://servername.com:5280/http-bind" rel="noreferrer noopener nofollow">http://servername.com:5280/http-bind</a>
结果是:
“在我看来,你真的不像是 BOSH 客户……你想要什么?”
最佳答案
注意:在最新版本中,Prosody 默认在端口 5281 上提供 HTTPS,因此此回复不再相关。
您正在 http 端口上尝试 https。这是行不通的。您可能需要为该端口配置 SSL 或使用 SSL 设置另一个端口。本页Setting up a BOSH server描述了如何做到这一点:
bosh_ports = {
{
port = 5280;
path = "http-bind";
},
{
port = 5281;
path = "http-bind";
ssl = {
key = "bosh.key";
certificate = "bosh.crt";
}
}
}
关于ssl - 通过 HTTPS 连接到 Prosody,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13982531/