Ing. Joel Santana
Ing. Joel Santana

Reputation: 1

Manager App Unauthorized using tomcat with vps Ubuntu 20.04

I am trying to log in to the Manager App in Tomcat 9.0.82 and i'm receiving this message

You are not authorized to view this page. If you have not changed any configuration files, please examine the file conf/tomcat-users in your installation. That file must contain the credentials to let you use this webapp.

For example, to add the manager-gui role to a user named tomcat with a password of s3cret, add the following to the config file listed above.

<role rolename="manager-gui"/> <user username="tomcat" password="s3cret" roles="manager-gui"/>

but in tomcat-users.xml i have the configuration <role rolename="manager-gui"/> <role rolename="admin-gui"/> <user username="admin" password="12345" roles="admin-gui,standar,manager-gui"/>

i'm using a hostinger vps with so Ubuntu 22.04 64bit

i add the role and user in tomcat-user and restart the server but continue same

Upvotes: -1

Views: 62

Answers (1)

Ing. Joel Santana
Ing. Joel Santana

Reputation: 1

i found the solution ! my problem was that missing a file context.xml in the location conf/Catalina/localhost after create this file put in this code

<Context privileged="true" antiResourceLocking="false" 
     docBase="${catalina.home}/webapps/manager">
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow=".*" />

after restart the server, works !

Upvotes: -1

Related Questions