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

tomcat用户权限配置

2013-10-16 15:36 288 查看
401 UnauthorizedYou are not authorized to view this page. If you have not changed any configuration files, please examine the fileconf/tomcat-users.xml in your installation. Thatfile must contain the credentials to let you use this webapp.For example, to add the manager-gui role to a user named tomcat with a password ofs3cret,add the following to the config file listed above.
<role rolename="manager-gui"/>
<user username="tomcat" password="s3cret" roles="manager-gui"/>
一开始
%CATALINA_HOME/conf/tomcat-user.xml该文件为空,必须要配置该文件才能管理tomcat应用。
对于manager app需要配置<role rolename="manager-gui"/>,而对于manager app需要配置<role rolename="admin-gui"/>,
这样可以通过admin这个账户访问了。
在tomcat参考文档中我们可以看到:
manager-gui — Access to the HTML interface.manager-status — Access to the "Server Status" page only.manager-script — Access to the tools-friendly plain text interface that is described in this document, and to the "Server Status" page.manager-jmx — Access to JMX proxy interface and to the "Server Status" page.这些角色是系统自带的,可以给某些用户配置这些权限,只要配置roles=“”即可
                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: