JBoss之控制台密碼的設定

來源:互聯網
上載者:User

JBoss設定

1.隱藏訪問目錄

jboss_home/server/default/deploy/jbossweb-tomcat55.sar/conf/web.xml

  1. <param-name>listings</param-name>
  2. <param-value>false</param-value>

2.設定JMX-Console控制台密碼

因為即使用防火牆將8080連接埠屏蔽,別有用心的使用者也可以通過http://your_domain/JMX-Console進行訪問,修改如下

JBOSS_HOME/server/default/deploy/jmx-console.war/WEB-INF/

web.xml 取消 <security-constraint>這段注釋

jboss-web.xml 取消 <security-domain> 這段注釋

JBOSS_HOME/server/default/conf/props

jmx-console-users.properties 修改 admin=admin 設定使用者名稱=設定密碼

jmx-console-roles.properties 修改 admin 改為 上面設定的使用者名稱

3、設定web-console的控制台密碼:

JBOSS_HOME/server/default/deploy/management/console-mgr.sar/web-console.war/WEB-INF/

web.xml 取消 <security-constraint>這段注釋

jboss-web.xml 取消 <security-domain> 這段注釋

cd ../class
web-console-roles.properties 修改 admin 改為 上面設定的使用者名稱

web-console-users.properties 修改 admin=admin 設定使用者名稱=設定密碼

將以上兩個檔案拷貝到 JBOSS_HOME/server/default/conf/props

vi JBOSS_HOME/server/default/conf/login-config.xml

找到

  1. <application-policy name = "web-console">
  2. <authentication>
  3. <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
  4. flag = "required">
  5. <module-option name="usersProperties">props/web-console-users.properties</module-option>
    <module-option name="rolesProperties">props/web-console-roles.properties</module-option>
  6. </login-module>
  7. </authentication>
  8. </application-policy>

4.修改jboss_home/server/default/conf/jboss-service.xml

將<!-- A flag to disable the scans -->

<attribute name="ScanEnabled">true</attribute> 將true改為false

到這裡,完成JBoss控制台密碼的設定。這樣設定一方面可以提高效能,另一方面及時JBoss應用被修改,也不會馬上生效,有利有弊.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.