1

I've created a virtual machine with Ubuntu 16.04 LTS and, following this guide, I've installed Tomcat 8.5 and configured as follows:

/opt/tomcat/webapps/host-manager/META-INF/context.xml:

<Context antiResourceLocking="false" privileged="true">
  <Valve className="org.apache.catalina.valves.RemoteAddrValve"
         allow="192\.168\.1\.124|127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />    
</Context>
<!-- my local ip is 192.168.1.124 so I've added it -->

/opt/tomcat/conf/tomcat-users.xml

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

No other configuration files has been modified.

The problem comes out when I try to access to the manager interface from my browser, it doesn't ask me any kind of credentials and throws me a 403 (Access Denied) error.

How can I fix this problem?

IlGala
  • 3,331
  • 4
  • 35
  • 49
  • possible duplicate at http://stackoverflow.com/questions/38551166/403-access-denied-on-tomcat-8-manager-app-without-prompting-for-user-password – Ye Win Nov 09 '16 at 09:56

1 Answers1

4

This is worked for me. Please check 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>

Tomcat8 Documentation.

Maheshwar Ligade
  • 6,709
  • 4
  • 42
  • 59