Open the Tomcat management interface and tomcat Management Interface
You encountered the following problems when managing tomcat:
1. At the beginning, a user name and password are required. I do not know what the user name and password are, but I did not enter any correct information.
Solution:
Add your own user conf folder in the tomcat-users.xml in the format
The default value is commented out, which mainly takes into account the security of the server. If it is a local test, remove the following comment, restart the server, and then enter
<Role rolename = "tomcat"/>
<Role rolename = "role1"/>
<User username = "tomcat" password = "tomcat" roles = "tomcat"/>
<User username = "both" password = "tomcat" roles = "tomcat, role1"/>
<User username = "role1" password = "tomcat" roles = "role1"/>
The user and password are clear at a glance.
2. After Entering the manager interface, the 403 Access Denied is displayed.
Solution:
See this passage in the conf/tomcat-users.xml file:
NOTE: By default, no user is logged in the "manager-gui" role required
To operate the "/manager/html" web application. If you want to use this app,
You must define such a user-the username and password are arbitrary.
To ensure security, tomcat does not have the manager-gui management permission by default.
You need to add the management permission (role) on your own ).
You need to add such permissions (roles)
<Role rolename = "manager-gui"/>
And then add it to the user name.
<User username = "tomcat" password = "tomcat" roles = "tomcat, manager-gui"/>
So OK.
<?xml version='1.0' encoding='utf-8'?><!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.--><tomcat-users><!-- NOTE: By default, no user is included in the "manager-gui" role required to operate the "/manager/html" web application. If you wish to use this app, you must define such a user - the username and password are arbitrary.--><!-- NOTE: The sample user and role entries below are wrapped in a comment and thus are ignored when reading this file. Do not forget to remove <!.. ..> that surrounds them.--> <!-- <role rolename="tomcat"/> <role rolename="role1"/> <user username="tomcat" password="tomcat" roles="tomcat"/> <user username="both" password="tomcat" roles="tomcat,role1"/> <user username="role1" password="tomcat" roles="role1"/>--> <role rolename="manager-gui"/> <role rolename="admin-gui"/> <user username="ming" password="064417" roles="manager-gui,admin-gui"/></tomcat-users>