By accessing the Tomcat default home page through a browser, you can manage the Web projects configured on that server, but only users who pass the certification will have access to the relevant pages, which are related to the $catalina_home/conf/ Tomcat-user.xml file, the following is a sample configuration document:
<role rolename= "Manager-gui" description= "Manager-gui"/> <role Rolename= "Manager-script" description= "Manager-script"/> <role rolename= " Manager-jmx " description=" manager-jmx "/> <role rolename=" Manager-status " description= "Manager-status"/> <role rolename= "Admin-gui" description= "Host Manager for html interface "/> <role rolename=" Admin-script " description= "Host manager for text interface"/> <group groupname= " Admin " description=" super privileges " roles=" MANAGER-GUI,MANAGER-SCRIPT,MANAGER-JMX, Manager-status,admin-gui,admin-script "/> <user username=" root " fullname" Administrator " password=" 123456 " groups=" admin "/> <user username=" Guest " Fullname= "Guest" password= "123456" roles= "manager-status "/>
The role element has a value of 6, and Manager-gui,manager-script,manager-jmx,manager-status is used when managing Webapps/manager projects, Admin-gui, Admin-script used when managing Webapps/host-manager projects. The values of these role are configured in the Web. xml file for each of the two websites, so the user can also modify the corresponding. xml file to more precisely control which pages each role can access. In the example above, the root user can access all administrative interfaces, and the guest user can only view the status information of the server, but not other operations.
Note that role, group, and user three elements must appear in order.
Tomcat Web Management user authentication Configuration