Essential configuration to login to Tomcat Supervisor
Tomcat supervisor is crucial for administrative duties. Nevertheless, by default it’s not purposeful.
There are some things you have to do to get Tomcat Supervisor working.
Let’s have a look at how…
As a greatest observe, again up the configuration file earlier than making any adjustments so you may roll again if one thing goes mistaken.
Tomcat 6.x/7.x
- Log in to the Tomcat server
- Go to the set up folder after which to the conf folder
- Open the
tomcat-users.xml
and add the next above</tomcat-users>
syntax
<function rolename="manager-gui"/> <person username="tomcat" password="tomcat" roles="manager-gui"/>
Comment: change the password from tomcat to one thing complicated.
- Restart Tomcat and attempt to log in
It must be profitable.
Pussycat 8.x/9.x
By default, Tomcat 8 Supervisor is configured to be accessed from the identical server on which it’s put in. If you go to Supervisor, you get a 403 error.
To make sure that a supervisor is accessible from any host/IP, you could do the next.
- Go to Tomcat set up after which
<span class="s1">webapps/supervisor/META-INF</span>
- Open
context.xml
and remark the valve half as beneath
<Context antiResourceLocking="false" privileged="true" > <!-- <Valve className="org.apache.catalina.valves.RemoteAddrValve" permit="127.d+.d+.d+|::1|0:0:0:0:0:0:0:1" /> --> <Supervisor sessionAttributeValueClassNameFilter="java.lang.(?:Boolean|Integer|Lengthy|Quantity|String)|org.apache.catalina.filters.CsrfPreventionFilter$LruCache(?:$1)?|java.util.(?:Linked)?HashMap"/> </Context>
Ex:
- Save the file
- Then go to the conf folder and open
tomcat-users.xml
so as to add the next above</tomcat-users>
syntax
<function rolename="manager-gui"/> <person username="tomcat" password="tomcat" roles="manager-gui"/>
- Save the configuration file and restart the Tomcat
Login ought to now be fantastic. I hope this helps.
In case you are new to Apache Tomcat or occupied with studying extra about administration, I might suggest this on-line course.