Wildfly ssl placement

wildfly 10 ssl (https access) configuration steps
1. Apply for a domain name certificate or generate it yourself
2. After the certificate is generated, it needs to be converted into a certificate file in the form of keystore. The available command can also go to
https://www.trustasia.com/tools-cert- converter, it can be converted into JKS
password to remember
3. After conversion, put the file into the standalone\configuration directory
4. Configure standalone.xml
<security-realm name="SslRealm">
<server-identities>
<ssl><keystore path="ke.jks" relative-to="jboss.server.config.dir" keystore-password="your_password" />
</ssl>
</server-identities>
</security-realm>
change default-server service Security-realm under https
<server name="default-server">
                <http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
                <https-listener name="https" socket-binding="https" security-realm="SslRealm" enable-http2="true"/>
                <host name="default-host" alias="localhost">
                    <location name="/" handler="welcome-content"/>
                    <filter-ref name="server-header"/>
                    <filter-ref name="x-powered-by-header"/>
                </host>
            </server>
改变socket-binding-group下的端口为443
<socket-binding name="https" port="${jboss.https.port:443}"/>
5启动服务,用https访问成功

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326181375&siteId=291194637