1 Introduction
After tomcat is started using startup, accessing port 8080 of the machine will automatically enter the tomcat management interface. The
following three functions require a user name and password to access, otherwise there will be a 403 insufficient authority, the tomcat user name and password Where to save it?
2. User name and password settings
(1) Through the failed interview, we can clearly see
There is a tomcat.user.xml file under conf/ to configure user information.
(2) The following words say, if we want to visit, we need to add such a sentence to the file
<role rolename="admin-gui"/>
<user username="tomcat" password="s3cret" roles="admin-gui"/>
The tomcat is the user name and s3cret is the password, of course we can modify it.
As for admin-gui, it is the role required to access this function.
(3) Finally, it explains what roles users can access with different functions
<role rolename="admin-gui"/>
<role rolename="manager-gui"/>
<user username="用户名" password="密码" roles="manager-gui,admin-script"/>
So we only need to add the above node under the tomcat-user node to access it.