vim $tomcat_home/conf/server.xml(可以单个IP或者多个ip,多个ip用|分隔,支持正则)
<Context path="" docBase="xxxAdmin" debug="0" reloadable="true" > <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="192.168.1.2|192.168.2.3" deny=""/> --只允许192.168.1.2和192.168.2.3
</Context>
<Context path="" docBase="xxxAdmin" debug="0" reloadable="true" > <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="" deny="192.168.1.2|192.168.2.3"/> --拒绝192.168.1.2和192.168.2.3
</Context>