Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tomcat manager never asking me ID/PASSWORD

I set up Apache Tomcat/9.0.0.M4 on Amazon Linux EC2 Instance. I completed to edit conf/tomcat-users.xml like this.

<role rolename="manager-gui"/>
<role rolename="manager-status"/>
<role rolename="admin"/>
<user username="tomcat" password="tomcat" roles="manager-gui,manager-status"/>

and then, I restarted Tomcat with ./shutdown.sh and ./startup.sh I tried to log-in, but Tomcat web page never ask ID/Password of manager. It only show me this 403 error page like this.

403 Access Denied

How to find log-in message box?

like image 891
younghot Avatar asked Sep 12 '25 08:09

younghot


1 Answers

I have faced a similar problem recently. You should create the manager.xml file in order to get remote access to your manager page.

According to the documentation:

"A default Tomcat installation includes the Manager. To add an instance of the Manager web application Context to a new host install the manager.xml context configuration file in the $CATALINA_BASE/conf/[enginename]/[hostname] folder"

In my case for example, I have this path: /usr/local/tomcat/conf/Catalina/localhost

And my file has something like this:

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

Remember that "^.*$" is a regular expression.

like image 105
Walter Avatar answered Sep 13 '25 23:09

Walter