Tomcat【管理页面】

编程入门 行业动态 更新时间:2024-10-13 00:36:43

Tomcat【管理<a href=https://www.elefans.com/category/jswz/34/1771336.html style=页面】"/>

Tomcat【管理页面】

管理页面的功能

  • server status :图形化管理、查看页面状态
  • Manager app:图像化添加、创建、部署、删除项目目录
  • host manager:图形化创建、管理、删除虚拟主机

默认安装tomcat需要配置以后才能使用

配置conf/tomcat-users.xml 

[root@nginx ROOT]# vim /soft/tomcat/conf/tomcat-users.xml <role rolename="manager-gui"/><role rolename="admin-gui"/><user username="tomcat" password="111" roles="manager-gui,admin-gui"/>
  • 由于tomcat默认仅本地127访问,需要进行basic认证,修改允许访问规则
[root@nginx ROOT]# vim /soft/tomcat/webapps/host-manager/META-INF/context.xml
<Context antiResourceLocking="false" privileged="true" ><CookieProcessor className="org.apache.tomcat.util.http.Rfc6265CookieProcessor"sameSiteCookies="strict" /><Valve className="org.apache.catalina.valves.RemoteAddrValve"allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1|192\.\d+\.\d+\.\d+" /><Manager sessionAttributeValueClassNameFilter="java\.lang\.(?:Boolean|Integer|Long|Number|String)|org\.apache\.catalina\.filters\.CsrfPreventionFilter\$LruCache(?:\$1)?|java\.util\.(?:Linked)?HashMap"/>
</Context>[root@nginx ROOT]# vim /soft/tomcat/webapps/manager/META-INF/context.xml
<Context antiResourceLocking="false" privileged="true" ><CookieProcessor className="org.apache.tomcat.util.http.Rfc6265CookieProcessor"sameSiteCookies="strict" /><Valve className="org.apache.catalina.valves.RemoteAddrValve"allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1|192\.\d+\.\d+\.\d+" /><Manager sessionAttributeValueClassNameFilter="java\.lang\.(?:Boolean|Integer|Long|Number|String)|org\.apache\.catalina\.filters\.CsrfPreventionFilter\$LruCache(?:\$1)?|java\.util\.(?:Linked)?HashMap"/>
</Context>

测试

 

更多推荐

Tomcat【管理页面】

本文发布于:2024-02-25 08:48:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1698411.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:页面   Tomcat

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!