<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