ejabberd_http HTTPS (TLS)

I used to run ejabberd 2.x but now I am forced to use 16.04. I used to have TLS enabled on the ejabberd_http webserver, as I don't want registration passwords to be sent in plain text.

My old http configuration which worked:

  {5280, ejabberd_http, [
                         %%{request_handlers,
                         %% [
                         %%  {["pub", "archive"], mod_http_fileserver}
                         %% ]},
                         captcha,
                         http_bind,
                         http_poll,
                         register,
                         web_admin,
                         tls,
                         {certfile, "/etc/ssl/ejabberd/server.pem"}
                        ]}

My new http configuration which doesn't work for TLS:

  -
    port: 5280
    module: ejabberd_http
    request_handlers:
      "/websocket": ejabberd_http_ws

    ##  "/pub/archive": mod_http_fileserver
    web_admin: true
    http_bind: true
    register: true
    captcha: true
    certfile: "/etc/ssl/ejabberd/server.pem"
    starttls: true

As you can see I have starttls set to true and a certificate file specified. The certificate is used in other parts of the configuration and works. However when you access it with HTTPS it just drops the connection without a response.

I fixed this by changing

I fixed this by changing "starttls: true" to "tls: true" - a lucky guess of what the problem was after noticing it was tls in the 2.x config.

Syndicate content