Wildfly many domains with many ssl certificates

I have a test server and I would like to run many applications on this instance, but there is a problem with SSL certificates. If I use a single certificate everything is fine, but if there is a problem when adding another one.

This is my ssl realm config:

<security-realm name="ssl-realm">
    <server-identities>
        <ssl>
            <keystore path="cert_one.jks" relative-to="jboss.server.config.dir" keystore-password="1234" key-password="1234"/>
            <keystore path="cert_two.jks" relative-to="jboss.server.config.dir" keystore-password="1234" key-password="1234"/>
        </ssl>
    </server-identities>
</security-realm>

      

And this is my server config:

<server name="default-server">
    <http-listener name="default" socket-binding="http"/>
    <https-listener name="defaultHttps" socket-binding="https" security-realm="ssl-realm" max-post-size="31457280"/>
    <host name="one_app" alias="firstapp.com">                    
        <filter-ref name="server-header"/>
        <filter-ref name="x-powered-by-header"/>
    </host>
    <host name="two_app" alias="secondapp.com">               
        <filter-ref name="server-header"/>
        <filter-ref name="x-powered-by-header"/>
    </host>
</server>

      

As you can see, I have two different keystores, one for firstapp.com and one for secondapp.com.

But only the certificate for secondapp.com works. If I delete one of these keystores everything is fine. How to set up two or more certificates for different domains in Wildfly configuration?

+3


source to share





All Articles