配置tomcat 管理端登陆
/apache-tomcat-6.0.35/conf/tomcat-users.xml 配置文件,使用时需要把注释去掉<!-- <!-- <role rolename="tomcat"/> <role rolename="role1"/> <user username="tomcat" password="tomcat" roles="tomcat"/> <user username="both" password="tomcat" roles="tomcat,role1"/> <user username="role1" password="tomcat" roles="role1"/> </tomcat-users> --> 默认情况下 tomcat 输入管理员用户名密码是无法登陆的,apache官网文档说 To enable access to the Manager web application, you must either create a new username/password combination and associate on of the manager roles with it, or add a manager role to some existing username/password combination. There are four roles defined by the manager application: * manager-gui - Allows access to the html interface * manager-script - Allows access to the plain text interface * manager-jmx - Allows access to the JMX proxy interface * manager-status - Allows access to the read-only status pages 所以要自己创建一种角色和一个用户名才能登陆tomcat管理端 可以根据自己的需要来创建管理端角色,我创建了一个manager-gui的角色,并分给tom用户manager-gui角色, <role rolename="tomcat"/> <role rolename="manager-gui"/> <role rolename="role1"/> <user username="tomcat" password="tomcat" roles="tomcat"/> <user username="both" password="tomcat" roles="tomcat,role1"/> <user username="role1" password="tomcat" roles="role1"/> <user username="tom" password="tomcat" roles="manager-gui"/> </tomcat-users> 重启服务后,顺利登陆管理端!
由此管理端配置结束,至此为止困扰我很久的破问题终于告一段落,折腾了这么久总结一个经验,做这些配置的时候还是要先看下官方文档,再寻求谷歌度娘帮忙,不然后果很坑爹!