LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1903|回复: 3

tomcat5的问题

[复制链接]
发表于 2005-9-4 17:44:18 | 显示全部楼层 |阅读模式
我是用apt-get安装的tomcat5.
可是启动服务后,http://127.0.0.1:8080/manager/status 页面和http://127.0.0.1:8080/manager/html页面总是报错!
HTTP Status 403 - Access to the requested resource has been denied

type Status report

message Access to the requested resource has been denied

description Access to the specified resource (Access to the requested resource has been denied) has been forbidden.
Apache Tomcat/5.0
但是http://127.0.0.1:8080/admin/
是正常的。
不知道是什么原因,我只是修改了一下/etc/tomcat5/tomcat-users.xml加上了一个admin用户和密码而已
发表于 2007-5-11 20:15:13 | 显示全部楼层
http://127.0.0.1:8080/admin/页,你的能登陆进去吗?
我的怎么登陆进去也报相同的错误呢?是不是目录没付权呢?
回复 支持 反对

使用道具 举报

发表于 2007-5-11 20:39:34 | 显示全部楼层
$TOMCAT_HOME\webapps\manager\WEB-INF\web.xml   
  1。在<web-app>和</web-app>之间加入   
      <security-constraint>   
          <web-resource-collection>   
              <web-resource-name>Entire   Application</web-resource-name>   
              <url-pattern>/*</url-pattern>   
          </web-resource-collection>   
          <auth-constraint>   
                <!--   NOTE:     This   role   is   not   present   in   the   default   users   file   -->   
                <role-name>user</role-name>   
          </auth-constraint>   
      </security-constraint>   
   
      <!--   Define   the   Login   Configuration   for   this   Application   -->   
      <login-config>   
          <auth-method>BASIC</auth-method>   
          <realm-name>TEST   ACCESS   CONTROL</realm-name>   
      </login-config>   
  //如果存在就不用加了,注意下面的东东   
  2。然后在$TOMCAT_HOME/conf/tomcat-users.xml中加入   
        <user   name="user"   password="password"   roles="user"/>     
        roles的名字和web.xml中的相对应     
   


终于找到原因了
回复 支持 反对

使用道具 举报

发表于 2007-6-4 10:32:53 | 显示全部楼层
The user must has "manager" role to access host manager app

<tomcat-users>
  <role rolename="manager"/>
  <role rolename="admin"/>
  <user username="yourname" password="yourpassword" roles="admin,manager"/>
</tomcat-users>
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表