zoukankan      html  css  js  c++  java
  • Tomcat8配置tomcat-users.xml配置

    默认tomcat-user.xml中的角色和用户配置示例如下:

    <!--

      <role rolename="tomcat"/>
      <role rolename="role1"/>
      <user username="tomcat" password="<must-be-changed>" roles="tomcat"/>
      <user username="both" password="<must-be-changed>" roles="tomcat,role1"/>
      <user username="role1" password="<must-be-changed>" roles="role1"/>

    -->

    如果仅把上述内容去掉并修改密码,重启tomcat后访问http://localhost:8081/manager/html,会报403 Access Denied无法登录管理界面。

    正确的配置如下:

    <role rolename="manager-gui"/>
    <role rolename="manager-script"/>
    <role rolename="manager-jmx"/>
    <role rolename="manager-status"/>
    <user username="admin" password="111111" roles="manager-gui,manager-script,manager-jmx,manager-status"/>

    原因是tomcat8中定义了以下4种角色,所以配置文件中的角色名称是不能任意填写的。

      • 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
  • 相关阅读:
    学单词的一点方法
    CSS布局标准
    前端开发知识之前端移动端适配总结
    用PS制作APP的界面图片
    Hadoop读写过程
    hadoop伪分布式搭建
    centos6.5安装vmware tools&共享文件夹显示
    02-虚拟机克隆配置
    SpringBootの使用Swagger2
    idea快捷键
  • 原文地址:https://www.cnblogs.com/xd502djj/p/9323184.html
Copyright © 2011-2022 走看看