<socket-binding-group name="standard-sockets" default-interface="global" port-offset="${jboss.socket.binding.port-offset:0}"> <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/> <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/> <socket-binding name="ajp" port="${jboss.ajp.port:8009}"/> <socket-binding name="http" port="${jboss.http.port:8080}"/> <socket-binding name="https" port="${jboss.https.port:8443}"/> <socket-binding name="txn-recovery-environment" port="4712"/> <socket-binding name="txn-status-manager" port="4713"/> <outbound-socket-binding name="mail-smtp"> <remote-destination host="localhost" port="25"/> </outbound-socket-binding> </socket-binding-group>
进入配置文件确认管理端口.如上,咱们使用https--9993 须要额外的进行一些配置.但http不须要,直接就能够使用.html
搜索到git
<security-realm name="ManagementRealm">
再在这个节点下添加TLS的相关配置(生产环境需添加自定义的keystore),以下所示:app
<server-identities> <ssl> <engine enabled-protocols="TLSv1 TLSv1.1 TLSv1.2"/> <keystore path="application.keystore" relative-to="jboss.server.config.dir" keystore-password="password" alias="server" key-password="password" generate-self-signed-certificate-host="localhost"/> </ssl> </server-identities>
其次,找到以下节点,修改以下(新增https="management-https")dom
<management-interfaces> <http-interface security-realm="ManagementRealm" http-upgrade-enabled="true"> <socket-binding http="management-http" https="management-https"/> </http-interface> </management-interfaces>
若是配置正确,启动后将以下显示:socket
11:03:28,787 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0062: Http management interface listening on http://127.0.0.1:9990/management and https://127.0.0.1:9993/management 11:03:28,790 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0053: Admin console listening on http://127.0.0.1:9990 and https://127.0.0.1:9993
出现上述日记信息就是表示咱们的设置正确. 而后使用上述链接进入管理台. 这个时候应该会跳转到一个error页面.ide
https://localhost:9993/error/index_win.html
这个页面是提示你没有用户,须要你手动去建立用户.this
进入目录 wildfly-10.1.0.Final\bin 下.能够看到add-user.bat. 双击运行.rest
What type of user do you wish to add? a) Management User (mgmt-users.properties) b) Application User (application-users.properties) (a): a Enter the details of the new user to add. Using realm 'ManagementRealm' as discovered from the existing property files. Username : credo Password recommendations are listed below. To modify these restrictions edit the add-user.properties configuration file. - The password should be different from the username - The password should not be one of the following restricted values {root, admin, administrator} - The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), 1 non-alphanumeric symbol(s) Password : WFLYDM0098: The password should be different from the username Are you sure you want to use the password entered yes/no? y Re-enter Password : What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[ ]: About to add user 'credo' for realm 'ManagementRealm' Is this correct yes/no? y Added user 'credo' to file 'D:\software\wildfly-10.1.0.Final-rePack_v3.1\wildfly-10.1.0.Final-rePack_v3.1\wildfly-10.1.0.Final\standalone\configuration\mgmt-users.properties' Added user 'credo' to file 'D:\software\wildfly-10.1.0.Final-rePack_v3.1\wildfly-10.1.0.Final-rePack_v3.1\wildfly-10.1.0.Final\domain\configuration\mgmt-users.properties' Added user 'credo' with groups to file 'D:\software\wildfly-10.1.0.Final-rePack_v3.1\wildfly-10.1.0.Final-rePack_v3.1\wildfly-10.1.0.Final\standalone\configuration\mgmt-groups.properties' Added user 'credo' with groups to file 'D:\software\wildfly-10.1.0.Final-rePack_v3.1\wildfly-10.1.0.Final-rePack_v3.1\wildfly-10.1.0.Final\domain\configuration\mgmt-groups.properties' Is this new user going to be used for one AS process to connect to another AS process? e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls. yes/no? y To represent the user add the following to the server-identities definition <secret value="Y3JlZG8=" /> 请按任意键继续. . .
添加完成.从新进刚才的页面. 将进入 https://localhost:9993/console/App.htmlcode
页面弹出个basic auth的输入框,输入你的帐号密码就能够了.server