Enable SSL on Wildfly 8.2.1

Knicked from “how to configure ssl in wildfly 8.2.0 server?.

This will be short and sweet.

Step1: Creating keystore

$ cd $WILDFLY_HOME/standalone/configuration
$ keytool -genkey -alias localhost -keyalg RSA -keystore keystore.jks -keysize 4096

Step2: Editing configuration/standalone.xml

<security-realms>
  **<security-realm name="SslRealm">
    <server-identities>
      <ssl>	
        <keystore path="keystore.jks"
		  relative-to="jboss.server.config.dir"
		  keystore-password="changeme"/>
      </ssl>
    </server-identities>
  </security-realm>**
</security-realms>

Step3: Adding listener for https by editing standalone.xml

<subsystem xmlns="urn:jboss:domain:undertow:1.2">
  <buffer-cache name="default"/>
  <server name="default-server">
    <http-listener name="default" 
      socket-binding="http"/>
    **<https-listener name="default-ssl" 
	    socket-binding="https"
	    security-realm="SslRealm"/>**
	...

Leave a comment