tomcat6 配置web管理端访问权限

配置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>  
  
  
重启服务后,顺利登陆管理端! 
 
由此管理端配置结束,至此为止困扰我很久的破问题终于告一段落,折腾了这么久总结一个经验,做这些配置的时候还是要先看下官方文档,再寻求谷歌度娘帮忙,不然后果很坑爹!  

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值