Connecting via HTTPS to Prosody

3.8k Views Asked by At

I'm trying to set up prosody to work over https with candy. I've tried configuring SSL and all of the steps listed to get that working but for some reason when I try https://servername.com:5280/http-bind it times out with the following appearing in the prosody log:

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  

when I try to do the same via http it works: http://servername.com:5280/http-bind results in: "You really don't look like a BOSH client to me... what do you want?"

1

There are 1 best solutions below

2
Zash On

Note: In recent versions, Prosody serves HTTPS on port 5281 by default, so this reply is no longer relevant.

You are trying https on a http port. This will not work. You will probably need to configure SSL for that port or setup another with SSL. The page Setting up a BOSH server describes how to do this:

bosh_ports = {
                 {
                    port = 5280;
                    path = "http-bind";
                 },
                 {
                    port = 5281;
                    path = "http-bind";
                    ssl = {
                             key = "bosh.key";
                             certificate = "bosh.crt"; 
                          }
                 }
              }