Server Status
By clicking on this button we can view the status of Tomcat, click, pop up the 403 error page
By viewing the official documentation
Therefore, create a manager.xml
# Cat/usr/local/tomcat/conf/catalina/localhost/manager.xml<context privileged= "true" antiResourceLocking= " False " docbase=" ${catalina.home}/webapps/manager "> <valve classname=" Org.apache.catalina.valves.RemoteAddrValve " allow=" ^.* "/></context>
Similarly, if we want to access host Manager, we need to create host-manager.xml
# Cat/usr/local/tomcat/conf/catalina/localhost/host-manager.xml <context privileged= "true" antiResourceLocking= "False" docbase= "${catalina.home}/webapps/host-manager" > <valve classname= " Org.apache.catalina.valves.RemoteAddrValve " allow=" ^.* "/></context>
Finally, we need to modify the Tomcat-users.xml
<role rolename= "Manager-gui"/> #对应的角色 <role rolename= "Admin-gui"/> #对应的角色 <user Username= "Tomcat" password= "Tomcat" roles= "Manager-gui,admin-gui"/> #用户密码tomcat, password tomcat, with Manager-gui, Admin-gui role
After rebooting tomcat, we can use the above account password to access these three pages
View the Tomcat Status page, manage apps, host management