Multiple SSL Certs not working?

Hello all,

Trying to add an additional domain + cert to my ejabberd install, but I'm hitting a wall. I'm set up as described in this thread:

https://www.ejabberd.im/node/3096

However I get the following error when starting ejabberd:

=INFO REPORT==== 2015-01-07 05:41:29 ===
    application: ejabberd
    exited: {"There is a problem in the configuration: the specified file is not readable: /etc/ejabberd/xmpp.firstdomain.com.pem",
             {ejabberd_app,start,[normal,[]]}}
    type: temporary

My cfg looks like this:

{listen,
[

  {5222, ejabberd_c2s, [

%%
%% If TLS is compiled in and you installed a SSL
%% certificate, specify the full path to the
%% file and uncomment this line:
%%
starttls,

{access, c2s},
{shaper, c2s_shaper},
{max_stanza_size, 65536}
       ]},

...
]}.

{domain_certfile, "xmpp.seconddomain.com", "/etc/ejabberd/xmpp.seconddomain.com.pem"}.

{domain_certfile, "xmpp.firstdomain.com", "/etc/ejabberd/xmpp.firstdomain.com.pem"}.

Notice that it seems to load the new cert pem ok, but my old cert says unreadable. (I know this because if I comment out the ,"{domain_certfile, "xmpp.firstdomain.com", "/etc/ejabberd/xmpp.firstdomain.com.pem"}." line, ejabberd loads just fine.

If I comment out "{domain_certfile, "xmpp.seconddomain.com", "/etc/ejabberd/xmpp.seconddomain.com.pem"}." line, and leave in the "{domain_certfile, "xmpp.firstdomain.com", "/etc/ejabberd/xmpp.firstdomain.com.pem"}." ejabberd again fails with the same "unreadable error".

Additionally, If I go back to my original configuration (not using the domain_certfile lines):

{listen,
[

  {5222, ejabberd_c2s, [

%%
%% If TLS is compiled in and you installed a SSL
%% certificate, specify the full path to the
%% file and uncomment this line:
%%
{certfile, "/etc/ejabberd/xmpp.firstdomain.com.pem"}, starttls,
{access, c2s},
{shaper, c2s_shaper},
{max_stanza_size, 65536}
       ]},

It works fine, so I know the .pem is valid and readable.

What am I missing? I've double-checked the syntax and spelling many, many times, and I just can't seem to figure it out.

Syndicate content