Hi, I'm trying to set bosh without success. The relevant bits in prosody.cfg.lua:
modules_enabled = {
[...]
"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
[...]
};
[...]
bosh_ports = { 5280 }
consider_bosh_secure = true
When testing this locally:
# curl -I localhost:5280/http-bind
HTTP/1.1 404 Not Found
Connection: Keep-Alive
Content-Length: 369
Date: Fri, 04 Jul 2014 23:06:25 GMT
# curl localhost:5280/http-bind
<html><body>
<p>It works! Now point your BOSH client to this URL to connect to
Prosody.</p>
<p>For more information see <a
href="http://prosody.im/doc/setting_up_bosh">Prosody: Setting up BOSH</a>.</p>
</body></html>
# curl xmpp.barrera.io/http-bind
<!DOCTYPE html>
<html>
<head><meta
charset="utf-8"><style>body{margin-top:14%;text-align:center;background-color:#F8F8F8;font-family:sans-serif;}h1{font-size:xx-large;}p{font-size:x-large;}p+p
{ font-size: large; font-family: courier }</style>
</head>
<body><h1>404 Not Found</h1><p>Whatever you were looking for is not here. It's
behind you.</p><p>Unknown host: xmpp.barrera.io</p>
</body>
My nginx config is LITERALLY a copy-paste from
https://prosody.im/doc/setting_up_bosh
Looking at pidgin's log, it gets the same 404 message I via curl
xmpp.barrera.io/http-bind.
I've also tried setting xmpp.barrera.io.
After looking at the error a bit, I tried some guessing and changed and changed
nginx to:
location / {
proxy_pass http://localhost:5280/http-bind;
proxy_set_header Host "localhost";
proxy_buffering off;
tcp_nodelay on;
}
(notice the change in Host). Why did I need this? Has anyone else had similar
experiences?
After this change, curl http://xmpp.barrera.io/ works as expected. Pidgin
manages to connect but with absolutely no encryption. If I enable HTTPS,
it fails. If I require encryption on the client or server side (or both),
it fails too.
Am I missing something on the nginx side? Has anyone else gotten bosh+nginx+tls
working?
Thanks,
--
Hugo Osvaldo Barrera
A: Because we read from top to bottom, left to right.
Q: Why should I start my reply below the quoted text?
pgpcMKY8LUz0K.pgp
Description: PGP signature
