After installing tomcat and configuring the Tomcat environment variable, visit the Manager app page with the 403 Access denied error, and the workaround is as follows:
First, in the Conf/tomcat-users.xml file, add the following code in the </tomcat-users> front:
[HTML]View PlainCopy
- <role rolename="Manager-gui"/>
- <user password="admin" roles="Manager-gui" username="Tomcat"/>
Then reboot Tomcat and revisit the Manager app page, if the 403 access denied error still occurs, then the IP access is restricted.
We open the/webapps/manager/meta-inf/directory under the context.xml file, not the conf/directory Context.xml file, must not be mistaken
We will comment out or fix the contents
[HTML]View PlainCopy
- <Valve classname="Org.apache.catalina.valves.RemoteAddrValve"
- allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1|\d+\.\d+\.\d+\.\d+" />
Save, then restart Tomcat, re-access the Manager app page, OK, the problem is resolved.
How to troubleshoot the Tomcat Administration page 403 Access denied