视频1 视频21 视频41 视频61 视频文章1 视频文章21 视频文章41 视频文章61 推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37 推荐39 推荐41 推荐43 推荐45 推荐47 推荐49 关键词1 关键词101 关键词201 关键词301 关键词401 关键词501 关键词601 关键词701 关键词801 关键词901 关键词1001 关键词1101 关键词1201 关键词1301 关键词1401 关键词1501 关键词1601 关键词1701 关键词1801 关键词1901 视频扩展1 视频扩展6 视频扩展11 视频扩展16 文章1 文章201 文章401 文章601 文章801 文章1001 资讯1 资讯501 资讯1001 资讯1501 标签1 标签501 标签1001 关键词1 关键词501 关键词1001 关键词1501 专题2001
HTTPStatus403–Accesstotherequestedresourcehasbeen
2020-11-09 07:30:57 责编:小采
文档


解决方法:

先进入manager所在目录
[root@localhost tomcat]# cd webapps/manager/WEB-INF/
查看 web.xml
[root@localhost WEB-INF]# more web.xml

 
 
 
 
 HTML Manager interface (for humans)
 /html/* 对应:http://localhost:8080/manager/html
 
 
 manager-gui 定义了访问这个页面的角色名:manage-gui
 
 
 
 
 Text Manager interface (for scripts)
 /text/*
 
 
 manager-script
 
 
 
 
 JMX Proxy interface
 /jmxproxy/*
 
 
 manager-jmx
 
 

 
 
 Status interface
 /status/* 对应:http://localhost:8080/manager/status 
 
 
 manager-gui 
 manager-script
 manager-jmx
 manager-status
 
 

进入host-manager所在目录
[root@localhost tomcat]# cd webapps/host-manager/WEB-INF/
查看 web.xml
[root@localhost WEB-INF]# more web.xml

 
 
 HTMLHostManager commands
 /html/* 对应:http://192.168.14.219:8080/host-manager/html
 
 
 
 admin-gui 定义了管理角色名称
 
 
 
 
 The role that is required to log in to the Host Manager Application HTML
 interface
 
 admin-gui
 
 
 
 The role that is required to log in to the Host Manager Application text
 interface
 
 admin-script
 

编辑Tomcat用户配置文件,添加角色
[root@localhost tomcat]# vi conf/tomcat-users.xml



 that surrounds them.
-->

 

  
 
 
 
 
 
--> 这里有个注释符号去掉,是下面的生效

重启 tomcat

[root@localhost tomcat]# ./bin/shutdown.sh
[root@localhost tomcat]# ./bin/startup.sh

总结:
虚拟目录/WEB-INF/web.xml一般定义了访问这个目录的安全角色名称,得知这个安全角色名称后便可在conf/tomcat-users.xml添加对应的访问角色,获得访问权限。(于是这里也是个黑客可以利用的后门。。)

下载本文
显示全文
专题