这是我配置了SSL的standalone-full.xml文件。
安全域。
安全域。
<security-realm name="SslRealm">
<server-identities>
<ssl>
<keystore path="D:\ncm.keystore" alias="ncm" keystore-password="*****" />
</ssl>
</server-identities>
</security-realm>
子系统
<server name="default-server">
<http-listener name="default" socket-binding="http" redirect-socket="https"/>
<https-listener name="default-ssl" socket-binding="https" security-realm="SslRealm"/>
<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 name="http" port="${jboss.http.port:8080}"/>
<socket-binding name="https" port="${jboss.https.port:8443}"/>
当用户访问 http://localhost:8080/myApp 时,如何重定向到 https:///localhost:8443/myApp ?