403 Access Denied On Tomcat 8 Manager App Without Prompting For User/password


Answer :

This may be work.

Find the CATALINA_HOME/webapps/manager/META-INF/context.xml file and add the comment markers around the Valve.

<Context antiResourceLocking="false" privileged="true" >  <!-- <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" /> -->  </Context> 

You can find more details at this page.


The solution that worked for me is edit context.xml files in both $CATALINA_HOME/webapps/manager/META-INF and $CATALINA_HOME/webapps/host-manager/META-INF where my ip is 123.123.123.123.

<Context antiResourceLocking="false" privileged="true" >   <Valve className="org.apache.catalina.valves.RemoteAddrValve"          allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1|123.123.123.123" /> </Context> 

I installed Tomcat 8.5 on Ubuntu and edited $CATALINA_HOME/conf/tomcat-users.xml:

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

However, I still couldn't access both Tomcat Web Application Manager (localhost:8080/manager/html) and Tomcat Virtual Host Manager (localhost:8080/host-manager/html) until I edited context.xml files.



Correct answer can be found here


Looks like this issue can be reproduced while folowing mentioned tutorial on unix machines. Also noticed that author uses TC 8.0.33
Win (and OSX) do not have such issue, at least on my env:

Server version:        Apache Tomcat/8.5.4 Server built:          Jul 6 2016 08:43:30 UTC Server number:         8.5.4.0 OS Name:               Windows 8.1 OS Version:            6.3 Architecture:          amd64 Java Home:             C:\TOOLS\jdk1.8.0_101\jre JVM Version:           1.8.0_101-b13 JVM Vendor:            Oracle Corporation CATALINA_BASE:         C:\TOOLS\tomcat\apache-tomcat-8.5.4 CATALINA_HOME:         C:\TOOLS\tomcat\apache-tomcat-8.5.4 

After tomcat-users.xml is modified by adding role and user Tomcat Web Application Manager can be accessed on Tomcat/8.5.4.


Comments

Popular posts from this blog

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?