403访问被tomcat 7拒绝访问主机管理器

Ram*_*man 6 tomcat7

我在具有tomcat 7的linux(fedora 17)机器上添加了用户和角色,如下所示,但仍然出现403访问被拒绝错误。如何解决呢?

<role rolename="tomcat"/>
<role rolename="manager"/>
<role rolename="admin"/>
<role rolename="admin-gui"/>
<role rolename="manager-gui"/>  
<user username="tomcat" password="tomcat" roles="admin_gui,manager_gui"/> 
<user username="admin" password="admin" roles="admin,manager,admin_gui,manager_gui"/> 
<user username="hextek" password="123456" roles="admin,admin_gui,manager,manager_gui"/>  
Run Code Online (Sandbox Code Playgroud)

Pau*_*est 4

检查您在使用定义中使用的角色名称。它们不同于标准以及您定义的标准。
应该是manager-gui

请注意,从 Tomcat 6.0.30 开始,使用管理器应用程序所需的角色从单一管理器角色更改为添加以下四个角色。(经理角色仍然可用,但不应使用,因为它避免了 CSRF 保护)。您需要分配您希望访问的功能所需的角色。

manager-gui - allows access to the HTML GUI and the status pages
manager-script - allows access to the text interface and the status pages
manager-jmx - allows access to the JMX proxy and the status pages
manager-status - allows access to the status pages only
Run Code Online (Sandbox Code Playgroud)