Tomcat8无法进入管理页面

Manager-App管理权限设置后仍无法进入页面

1. 配置管理账号密码

当首次打开localhost:8080时,点击Manager App按钮,出现403配置信息

进入tomcat8/conf/tomcat-users.xml配置账号密码

1
2
3
4
5
6
root@pi:/usr/local/tomcat8/bin# cd ..
root@pi:/usr/local/tomcat8# cd conf
root@pi:/usr/local/tomcat8/conf# nano tomcat-users.xml

<role rolename="manager-gui"/>
<user username="tomcat8" password="tomcat8" roles="manager-gui,manager-script"/>

2. 重启tomcat仍出现403

1
2
You are not authorized to view this page.
By default the Host Manager is only accessible from a browser running on the same machine as Tomcat. If you wish to modify this restriction, you'll need to edit the Host Manager's context.xml file.

编辑tomcat8/webapps/manager/META-INF/context.xml

tomcat8/webapps/host-manager/META-INF/context.xml

将其中的

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

注释掉

重启tomcat

本文结束  感谢您的阅读