登录Tomcat的Manager-App时出现401未授权错误 [英] 401 Unauthorized error while logging in Manager-App of Tomcat

查看:126
本文介绍了登录Tomcat的Manager-App时出现401未授权错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Mac OS X 10.7 的 Tomcat 7.0.22 中登录管理器应用程序.这是我得到的错误:http://f.cl.ly/items/421q1K3f1i0X1H1M181v/so.tiff

I am trying to log in to the Manager App in Tomcat 7.0.22 for Mac OS X 10.7. Here is the error I am getting: http://f.cl.ly/items/421q1K3f1i0X1H1M181v/so.tiff

401 Unauthorized

You are not authorized to view this page. If you have not changed any configuration files, please examine the file conf/tomcat-users.xml in your installation. That file 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 of s3cret, add the following to the config file listed above.

<role rolename="manager-gui"/>
<user username="tomcat" password="s3cret" roles="manager-gui"/>

我已经在我的 tomcat-users.xml 中添加了这个,但它仍然没有使用相同的用户名/密码.

I have added this in my tomcat-users.xml, still its not taking the same username/password.

<tomcat-users>
<role rolename="manager-gui"/>
<user name="tomcat" password="s3cret" roles="standard,manager-gui"/>
</tomcat-users>

推荐答案

对不起,我问一个显而易见的问题:你重启Tomcat了吗?

Sorry, I have to ask the obvious: Did you restart Tomcat?

如果这不起作用,请尝试将admin-gui"添加到您的角色中:

If that doesn't work, try adding "admin-gui" to your roles:

<user name="tomcat" password="s3cret" roles="admin-gui,standard,manager-gui"/>

这篇关于登录Tomcat的Manager-App时出现401未授权错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆