Saturday 23 September 2017

Access tomcat manager from remote host

Alongside configuring access in $CATALINA_HOME/conf/tomcat-users.xml, an additional step is required if you want to access the manager application from a remote host. Edit the $CATALINA_HOME/webapps/manager/META-INF/context.xml file and ensure the allow attribute has a value of ^.*$.

For example:
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" />


The complete file will look similar to this:
<?xml version="1.0" encoding="UTF-8"?>
<Context antiResourceLocking="false" privileged="true" >
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" />
<Manager sessionAttributeValueClassNameFilter="java\.lang\.(?:Boolean|Integer|Long|Number|String)|org\.apache\.catalina\.filters\.CsrfPreventionFilter$LruCache(?:$1)?|java\.util\.(?:Linked)?HashMap"/>
</Context>


No comments:

Post a Comment