1. create keystore certificate for jboss user

    keytool -genkey -alias jboss -keyalg RSA

  2. edit jboss configuration file standalone.xml:

               ......                                     ......    

                                     

in subsystem web we must finally have :

        <subsystem default-virtual-server="default-host" xmlns="urn:jboss:domain:web:1.1" native="false">
            <connector socket-binding="httpLocal" scheme="http" protocol="HTTP/1.1" name="http"></connector>
            <connector socket-binding="https" scheme="https" protocol="HTTP/1.1" name="https" secure="true">
              <ssl password="pwd typed in step 1"></ssl>
            </connector>
            <virtual-server enable-welcome-root="true" name="default-host">
                <alias name="localhost"></alias>
                <alias name="example.com"></alias>
            </virtual-server>
        </subsystem>