gpt4 book ai didi

tomcat - 如何修复 Tomcat HTTP 状态 403 : Access to the requested resource has been denied?

转载 作者:行者123 更新时间:2023-11-28 21:47:05 24 4
gpt4 key购买 nike

我正在尝试使用我当前的源代码来设置 Tomcat。我从 tomcat 站点 (6.0.32) 下载了 zip。

然后我将项目的配置文件放入 tomcatDir\conf\Catalina\localhost

然后我将用户添加到 tomcat-users.xml

当我使用 localhost:8080/<context root> 访问我的应用程序时,我得到了我应该得到的登录提示。提供正确的凭据后,tomcat 会抛出 403 错误。我可以通过 localhost:8080/manager/ 访问经理

tomcat-users.xml :

<role rolename="manager"/>
<role rolename="admin"/>
<user username="admin" password="5c50nD" roles="admin,manager"/>
<user username="nih\kishorev" password="altum" roles="admin,manager"/>

最佳答案

您应该选择由 tomcat 定义的管理器角色,而不是 admin 或 manager。

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

链接到 Configuring Manager Application access in tomcat

关于tomcat - 如何修复 Tomcat HTTP 状态 403 : Access to the requested resource has been denied?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5808206/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com