亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何登陸Tomcat的控制臺?

如何登陸Tomcat的控制臺?

慕容3067478 2019-04-02 07:07:31
如何登陸Tomcat的控制臺
查看完整描述

3 回答

?
12345678_0001

TA貢獻1802條經驗 獲得超5個贊

  當我們成功安裝啟動Tomcat服務后,在瀏覽器輸入http://localhost:8080(8080是Tomcat的默認端口,可自行修改)回車

   右上角可以看到三個控制臺:Server Status、Manager App、Host Manager

  Server Status:用于監控服務器狀態

  Manager App:可以部署、監控Web應用

  當我們嘗試登陸任何一個管理界面,都是要求輸入用戶名及密碼的

   那么用戶名、密碼是什么呢?我們先來看看Tomcat的Manager控制臺對應的Web應用下的web.xml文件

  路徑為:webapps\manager\WEB-INF(其實就在我們部署應用的webapps文件夾下)

  相應配置片段:

  "<security-constraint>

  <web-resource-collection>

  <web-resource-name>HTML Manager interface (for humans)</web-resource-name>

  <url-pattern>/html/*</url-pattern>

  </web-resource-collection>

  <auth-constraint>

  <role-name>manager-gui</role-name>

  </auth-constraint>

  </security-constraint>

  <security-constraint>

  <web-resource-collection>

  <web-resource-name>Text Manager interface (for scripts)</web-resource-name>

  <url-pattern>/text/*</url-pattern>

  </web-resource-collection>

  <auth-constraint>

  <role-name>manager-script</role-name>

  </auth-constraint>

  </security-constraint>

  <security-constraint>

  <web-resource-collection>

  <web-resource-name>JMX Proxy interface</web-resource-name>

  <url-pattern>/jmxproxy/*</url-pattern>

  </web-resource-collection>

  <auth-constraint>

  <role-name>manager-jmx</role-name>

  </auth-constraint>

  </security-constraint>

  <security-constraint>

  <web-resource-collection>

  <web-resource-name>Status interface</web-resource-name>

  <url-pattern>/status/*</url-pattern>

  </web-resource-collection>

  <auth-constraint>

  <role-name>manager-gui</role-name>

  <role-name>manager-script</role-name>

  <role-name>manager-jmx</role-name>

  <role-name>manager-status</role-name>

  </auth-constraint>

  </security-constraint>

  "

  從配置片段來看,訪問不同的資源需要不同的用戶角色,而我們要訪問Manager App控制臺需要manager-gui角色即可,了解相應角色,那么接下來分配用戶名及密碼即可

  用戶配置可以到Tomcat的cof目錄下的tomcat-users.xml文件進行配置,配置方式為:

  (注:要配置在標簽內)

  當我們配置保存重啟Tomcat服務后,即可登錄 



查看完整回答
反對 回復 2019-04-11
?
蕪湖不蕪

TA貢獻1796條經驗 獲得超7個贊


<role rolename="tomcat"/>
<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<role rolename="role1"/>
<user username="tomcat" password="tomcat" roles="manager,admini,manager-gui,admin-gui"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>

查看完整回答
反對 回復 2019-04-11
  • 3 回答
  • 0 關注
  • 4006 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號