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