Home java Accessing Tomcat Manager

Accessing Tomcat Manager

Author

Date

Category

Installed tomcat on a dedicated server.
I go by IP address or by domain (set port 80 in server.xml ), everything is as it should, the page opens.
I want to go to server status , manager app , host manager – I see an error 403 .
Google only hints on adding users to tomcat-users.xml, but it doesn’t help. Added several users with different roles, one with all at once, and still 403 error, after entering the username and password. What’s the problem?

tomcat-users.xml : (without all the standard comments)

& lt; tomcat-users xmlns = "http://tomcat.apache.org/xml"
       xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance"
       xsi: schemaLocation = "http://tomcat.apache.org/xml tomcat-users.xsd"
       version = "1.0" & gt;
 & lt; role rolename = "manager-gui" / & gt;
 & lt; role rolename = "manager" / & gt;
 & lt; role rolename = "manager-status" / & gt;
 & lt; role rolename = "admin-gui" / & gt;
 & lt; role rolename = "admin" / & gt;
 & lt; user username = "tomcat" password = "tomcat" roles = "admin, admin_gui, manager, manager_gui, manager-status" / & gt;
 & lt; user username = "manager" password = "managergui" roles = "manager_gui" / & gt;
& lt; / tomcat-users & gt;

Answer 1, authority 100%

You have an error in the name of the user’s role. Instead of manager_gui , it should be manager-gui , and instead of admin_gui , it should be admin-gui . Not an underscore, but a dash (hyphen).


Answer 2

Your role is written like this:

& lt; role rolename = “manager-status” / & gt;
& lt; role rolename = “admin-gui” / & gt;

Accordingly, the same names are used in the user section For more details, see the link

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions