tomcat8.5相比之前的tomcat进入manger管理界面需要多一些设置
1. 在 $tomcathome/conf/Catalina/localhost/下创建 manager.xml , 填入如下内容:
<Context privileged="true" antiResourceLocking="false"
docBase="${catalina.home}/webapps/manager">
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" />
</Context>
2. 添加用户:
$tomcathome/conf/tomcat-users.xml 中的 <tomcat-users></tomcat-users> 标签内添加如下代码:
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<role rolename="admin-gui"/>
<role rolename="admin-script"/>
<user username="admin" password="admin" roles="manager-gui,manager-script,manager-jmx,manager-status,admin-gui,admin-script"/>
<user username="deploy" password="deploy" roles="manager-script"/>
开启tomcat