Here's my tomcat-users.xml
:
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="admin"/>
<role rolename="manager"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="MyAdmin" password="pswd" roles="admin,manager"/>
</tomcat-users>
I restart tomcat and go to localhost:8080/manager
. It asks me to log in. I enter the admin/manager credentials (u = MyAdmin and p = pswd) and it fails, giving me the following 403:
Whats going on here? I'm almost 100% sure I have the XML configured right!?! Is it possible something else isn't configured properly?
I just realized from your screenshot you are using Tomcat 7. Roles have changed a little bit. See the updated documentation
You can find the role names in the web.xml file of the Manager web application. The available roles are:
manager-gui — Access to the HTML interface.
manager-status — Access to the "Server Status" page only.
manager-script — Access to the tools-friendly plain text interface that is described in >this document, and to the "Server Status" page.
manager-jmx — Access to JMX proxy interface and to the "Server Status" page.
update your role to the appropriate setting.
Those roles are gone. Your account needs the manager-gui
role. You obviously did not read the docs .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.