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

标签 tomcat http-status-code-403

我正在尝试使用我当前的源代码来设置 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/

相关文章:

java - Web 服务的生命周期异常

java - 是否可以将 JNDI context.xml 文件从文件系统导入到 Spring 应用程序中?

django - 重定向 + 403 错误

php - Zend 框架中 403 的最快方法

java - 调整多个图像大小时 Tomcat 服务器崩溃

java - 如何使用 servlet 4.0 配置 taglib

typescript - 在 aurelia (typeScript) 中以通用方式处理 403 错误

通过 3G 的 Android ICS 连接收到 403 响应,但通过 Wifi 正常

java - 最佳实践 : Creation of SAX parser for XMLReader

php - 在通过 Android 应用程序访问本地主机中的 PHP 脚本时,我在 Connection{192.168.43.230 :25689, ..}