Tomcat 8系列笔记:配置管理主页(status、manager app、host manager)

红太狼 2021-02-27 16:22 936阅读 0赞

启动tomcat后,会进入如下页面进入tomcat管理控制台。

70

如果没有配置tomcat-users,点击Server Status、Manager APP、Host Manager 出现403。

70 1

文件内容如下,需要添加user到该文件中,即可。正常文件,该部分是注释掉的。

70 2

  1. <role rolename="manager-gui"/>
  2. <role rolename="manager-script"/>
  3. <role rolename="manager-jmx"/>
  4. <role rolename="manager-status"/>
  5. <role rolename="admin-script"/>
  6. <role rolename="admin-gui"/>
  7. <user username="tomcat" password="tomcat" roles="manager-gui,manager-script,manager-jmx,manager-status,admin-gui,admin-script"/>

Manager的管理角色:

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

正常启动,登录用户名密码后进入:

70 3

根据上图,可以进行监控台关注,解释一下各指标的含义:

Status-JVM

  • Free memory:剩余内存;
  • Total menory:总内存;
  • Max menory:最大内存。

Status-HTTP

  • Max threads:最大线程数;
  • Current thread count:当前线程数;
  • Current thread busy:当前忙碌线程数;
  • Max processing time:最大处理时间;
  • ms Processing time:最短处理时间;
  • Request count:请求数;
  • Error count:错误数;
  • Bytes received:接受字节;
  • Bytes sent:发送字节。

如果点击提示403页,则需要修改host-manager和manager下的content.xml文件。

70 4

70 5

70 6

content.xml内容:

70 7

更改一下IP访问白名单:

  1. <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" />

OK了。

发表评论

表情:
评论列表 (有 0 条评论,936人围观)

还没有评论,来说两句吧...

相关阅读

    相关 配置tomcat8

    需要将访问服务器的文件放到E:\\tomcat8\\webapps\\ROOT里面去才行,这样在浏览器中才能访问到 用Android连接Tomcat本地服务器的话,需要共享电