OS: Ubuntu 18.04
Tomcat version: 9
This my conf
<Context antiResourceLocking="false" privileged="true" >
<!-- <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" /> --> <!-- i try this as well -->
<!-- <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="\d+\.\d+\.\d+\.\d+" /> -->
</Context> This is my tomcat-users.xml
<tomcat-users> <role rolename="admin"/> <role rolename="admin-gui"/> <role rolename="manager"/> <role rolename="manager-gui"/> <user username="name" password="pwd" roles="admin,admin-gui,manager,manager-gui"/>
</tomcat-users>I browse 403 Access Denied
I've seen these questions and their answers
- 403 Access Denied on tomcat Server?
- Can't enter in Manager App tomcat
- Ubuntu tomcat Server Configuration
These questions from Stack Overflow
- 403 Access Denied on Tomcat 8 Manager App without prompting for user/password
- 403 Access Denied on Tomcat 8 Manager App without prompting for user/password
- Apache Tomcat/8.5.3 Manager App 403 error
- 403 Access Denied in Tomcat
- 403 Access Denied on tomcat 7 to access host manager
What else can I try?
1 Answer
See this question on Stack Overflow
There are TWO files context.xml
- in
$CATALINA_HOME/webapps/host-manager/META-INF - in
$CATALINA_HOME/webapps/manager/META-INF
Add comment at <Valve in these files.
In $CATALINA_HOME/conf/tomcat-users.xml add:
<role rolename="admin-gui"/>
<role rolename="admin-script"/>
<role rolename="manager-status"/>
<role rolename="manager-script"/>
<role rolename="manager-gui"/>
<user username="admin" password="admin" roles="admin-script,admin-gui,manager-script,manager-gui,manager-status"/>It works with TOMCAT 10.0.6 but I think it works for previous versions too.