how to configure ssl in wildfly 8.2.0 server?

前端 未结 1 1447
天涯浪人
天涯浪人 2021-01-01 02:47

I want secure connection for my web application. So, i want to configure ssl for my wildfly 8.2.0 server. I have created and stored .keystore file in standalone/configuratio

相关标签:
1条回答
  • 2021-01-01 03:01

    I have configured ssl for wildfly 8.2.0.

    step1: Creating keystore

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

    step2: Editing configuration/standalone.xml

     <management>
     <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"/>**
    

    Now ssl is configured and my website is secured.

    0 讨论(0)
提交回复
热议问题