windows Tomcat 8.5之后无法进入管理页面

Tomcat 8.5之后无法进入管理页面


在使用Tomcat 8.5学习时,按照以往配置想进入管理页面,却出现如下问题:

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

 

修改这两个文件将这一行注释掉

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

/application/tomcat/webapps/manager/META-INF/context.xml

/application/tomcat/webapps/host-manager/META-INF/context.xml


同时编辑 /application/tomcat/conf/tomcat-users.xml文件,设置用户名、密码

<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="tomcat" password="tomcat" roles="manager-gui,admin-gui"/>
重启Tomcat即可。

windows Tomcat 8.5之后无法进入管理页面

转载 https://www.jianshu.com/p/2e4e5fc7b3c6