パスワードを使用してTomcat Administrationにログインするにはどうすればいいですか?



 
  
  
  
  
  1. Tomcat Administration? 
  2. : 
  3. You are not authorized to view this page. If you have not changed any configuration files, please examine the file conf/tomcat-users.xml in your installation. That file must contain the credentials to let you use this webapp. 
  4.  
  5. For example, to add the manager-gui role to a user named tomcat with a password of s3cret, add the following to the config file listed above. 
  6.  
  7. <role rolename="manager-gui"/> 
  8. <user username="tomcat" password="s3cret" roles="manager-gui"/> 
  9.  
  10. Note that for Tomcat 6.0.30 onwards, the roles required to use the manager application were changed from the single manager role to the following four roles. You will need to assign the role(s) required for the functionality you wish to access. 
  11.  
  12.     manager-gui - allows access to the HTML GUI and the status pages 
  13.     manager-script - allows access to the text interface and the status pages 
  14.     manager-jmx - allows access to the JMX proxy and the status pages 
  15.     manager-status - allows access to the status pages only 
  16.  
  17. The HTML interface is protected against CSRF but the text and JMX interfaces are not. To maintain the CSRF protection: 
  18.  
  19.     The deprecated manager role should not be assigned to any user. 
  20.     Users with the manager-gui role should not be granted either the manager-script or manager-jmx roles. 
  21.     If the text or jmx interfaces are accessed through a browser (e.g. for testing since these interfaces are intended for tools not humans) then the browser must be closed afterwards to terminate the session. 
  22.  
  23. , conf/tomcat-users.xml , , : 
  24.  
  25. manager-gui   HTML tomcat  
  26. manager-script   ( GUI ) tomcat status  
  27. manager-jmx  JMX  
  28. manager-status  
  29. , , 。
  1. 、 , : 
  2. #vim /usr/local/tomcat/conf/tomcat-users.xml 
  3. <role rolename="manager-gui"/> 
  4. <user username="cheng" password="redhat" roles="manager-gui"/> 
  5. 、 tomcat, ! status,Tomcat Manager !