zoukankan      html  css  js  c++  java
  • tomcat9.0 配置账户

    原文见: http://blog.csdn.net/guochunyang/article/details/51820066

     

    tomcat9.0 管理页面如:http://192.168.2.101:80/manager/html出现如下错误:

    403 Access Denied

    1.需要配置:

    Tomcat/conf/tomcat-users.xml加入:

     <role rolename="manager"/>     
      <role rolename="admin"/> 
      <role rolename="admin-gui"/>
      <role rolename="manager-gui"/>
      <user username="xxx" password="***" roles="admin-gui,manager-gui"/>

    以上配置好后本地可以访问,http://127.0.0.1:8080/manager/html

    2.另外,需要修改Tomcat/webapps/manager/META-INF/context.xml文件:

    <Context antiResourceLocking="false" privileged="true" >
      <!--
        Remove the comment markers from around the Valve below to limit access to
        the manager application to clients connecting from localhost
      -->
      
      <Valve className="org.apache.catalina.valves.RemoteAddrValve"

             allow="127.d+.d+.d+|::1|0:0:0:0:0:0:0:1|d+.d+.d+.d+" />
      -</Context>

    或注释Value节点(tomcat9.0以下默认是注释的,所以不需修改)

    <!--
      <Valve className="org.apache.catalina.valves.RemoteAddrValve"
             allow="127.d+.d+.d+|::1|0:0:0:0:0:0:0:1" />
      -->

    参考tomcat9.0文档:http://tomcat.apache.org/tomcat-9.0-doc/config/valve.html#Remote_Address_Filter

  • 相关阅读:
    html5手机摇一摇
    js全屏滚动效果
    js的 && 和 || 的应用
    VOLTDB基础知识
    WildFly 报错 java.lang.NoClassDefFoundError
    -Linux基础知识2 -文件系统的操作 压缩,解压缩
    Linux基础知识1
    Linux chgrp chown chmod 基础知识
    实例化list
    判断条件为空时需要注意
  • 原文地址:https://www.cnblogs.com/yaowen/p/9528311.html
Copyright © 2011-2022 走看看