Apache, Linux, Others, Shell Script, Web Services

How to access Tomcat Admin manager console from another remote machine ?

By Default, Tomcat Admin console can be accessed only in the machine(if necessary roles are set) it is running via:
http://localhost:8080/manager/html

If you want to access from any other machine or want to enable globally necessary changes needs to be done in ${Catalina.Home}/conf/Catalina/Localhost/manager.xml, if file is not there create it.

Follow as mentioned below:

Create or Update the file 
${Catalina.Home}/conf/Catalina/Localhost/manager.xml

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

Valve tag allow attribute represents whitelisted IP address:
^.*$
-> allows any machine

Make sure  admin, admin-gui, manager-gui roles , user , credentials are created.

How To create roles & assignment for users ?

Step 1:

Go To: conf/tomcat-users.xml

create roles for admin as below:

<role rolename=”admin”/>
<role rolename=”admin-gui”/>
<role rolename=”manager-gui”/>

Step 2:
Create user & Assign roles:

<user username=”user1” password=”Admin123$”   roles=”manager-gui,admin,admin-gui“/>

Step 3:
Stop & Start the server:

Stop the server
sh catalina.sh stop // For Linux Users
catalina.bat stop // For Windows Users

Start the server

sh catalina.sh start // For Linux Users
catalina.bat start // For Windows Users

Step 4:

access the server console:
<ip-address>:<port_number>/manager/html

assume
ip-addr: 192.546.22.90
port-number: 8080 (can be changed in conf/context.xml)

http://192.546.22.90:8080/manager/html
https://192.546.22.90:8080/manager/html  (if ssl enabled)

Thanks for reading , I hope it would be beneficial !!

 

2 Comments

  1. Andrew Krenitz

    It didn’t work 🙁

    • Hi Andrew,

      Please help me out to understand your use case, that helps me to suggest

      Check the file permission on which user it is created..
      If child account is used may not be accessible.

      Share me the line you have used in tomcat-users.xml

Leave a Reply

Theme by Anders Norén

en_USEnglish
en_USEnglish
%d bloggers like this:
Skip to toolbar