Tomcat 403错误 [英] Tomcat 403 Error

查看:646
本文介绍了Tomcat 403错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的 tomcat-users.xml

<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
    <role rolename="tomcat"/>
    <role rolename="role1"/>
    <role rolename="admin"/>
    <role rolename="manager"/>

    <user username="tomcat" password="tomcat" roles="tomcat"/>
    <user username="MyAdmin" password="pswd" roles="admin,manager"/>
</tomcat-users>

我重新启动tomcat并转到 localhost:8080 / manager 。它要求我登录。我输入管理员/管理员凭据(u = MyAdmin,p = pswd),但失败,并显示以下403:

I restart tomcat and go to localhost:8080/manager. It asks me to log in. I enter the admin/manager credentials (u = MyAdmin and p = pswd) and it fails, giving me the following 403:

这是怎么回事?我几乎100%确定可以正确配置XML!

Whats going on here? I'm almost 100% sure I have the XML configured right!?! Is it possible something else isn't configured properly?

推荐答案

我刚刚从您的屏幕快照中意识到您正在使用Tomcat7。
角色有所改变。请参阅更新的文档

I just realized from your screenshot you are using Tomcat 7. Roles have changed a little bit. See the updated documentation


您可以在Manager web
应用程序的web.xml文件中找到角色名称。可用的角色有:

You can find the role names in the web.xml file of the Manager web application. The available roles are:

manager-gui-访问HTML界面。

manager-gui — Access to the HTML interface.

manager-status-仅访问服务器状态页面。

manager-status — Access to the "Server Status" page only.

manager-script —访问本文档中描述的工具友好的纯文本界面,以及服务器状态页面。

manager-script — Access to the tools-friendly plain text interface that is described in >this document, and to the "Server Status" page.

manager-jmx-访问JMX代理界面和服务器状态页面。

manager-jmx — Access to JMX proxy interface and to the "Server Status" page.

将您的角色更新为适当的设置。

update your role to the appropriate setting.

这篇关于Tomcat 403错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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