以前用的8.0版本的tomcat,最近须要将版本升级,当前8的最新的版本是8.5.42,升级以后发现manager页面打不开了,就是下面这个按钮的页面web
点击以后报403没权的错误tomcat
仍是按照8.0版本的配置方法,在conf/tomcat-users.xml中配置权限和用户名密码,相似页面提示的这样。app
<role rolename="manager-gui"/> <user username="tomcat" password="s3cret" roles="manager-gui"/>
可是重启服务后仍是提示一样的错误,再次确认配置的没问题后,此次才好好的把页面的错误提示读了一遍,发现有这么个提示webapp
By default the 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 Manager's context.xml file.ui
默认只容许本机访问了,若是要容许其余主机访问要去修改manaager的context.xml文件,看来这是8.5的新特性了,找到webapps\manager\META-INF\context.xml 文件,看到文件里果真有限制本机访问的配置,将这段注释掉this
重启服务以后,再次访问就能够登陆了,用你配置的用户名密码就能够进入管理页面了3d