您的位置:首页 > 运维架构 > Tomcat

tomcat 7.0.21 后台权限登录

2011-09-17 15:31 197 查看
支持的角色权限查看在\webapps\manager\WEB-INF\web.xml中,在web.xml下查看

<security-role>

<description>

The role that is required to access the HTML Manager pages

</description>

<role-name>manager-gui</role-name>

</security-role>

<security-role>

<description>

The role that is required to access the text Manager pages

</description>

<role-name>manager-script</role-name>

</security-role>

<security-role>

<description>

The role that is required to access the HTML JMX Proxy

</description>

<role-name>manager-jmx</role-name>

</security-role>

<security-role>

<description>

The role that is required to access to the Manager Status pages

</description>

<role-name>manager-status</role-name>

</security-role>

说明支持四种角色:manager-gui、manager-script、manager-jmx、manager-status

然后在conf目录下的tomcat-users.xml中配置用户及角色,例如:

<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<user username="nb" password="kb" roles="manager-gui,manager-script,manager-jmx,manager-status"/>
</tomcat-users>
说明用户nb,秘密kb,支持四种角色,也可以配置一种或多种角色。
修改完tomcat-users.xml后重启tomcat服务,并且清空IE缓存密码表单等信息再次尝试登录!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  职场 tomcat 休闲