标签:ali serve style 虚拟目录 XML bsp 访问 valve rem
1.全局设置,设置允许某些IP能够访问到tomcat服务器,或不能访问tomcat服务器
1,只允许192.168.1.10访问: <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="192.168.1.10" deny=""/>
2,只允许192.168.1.*网段访问: <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="192.168.1.*" deny=""/>
3,只允许192.168.1.10、192.168.1.30访问: <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="192.168.1.10,192.168.1.30" deny=""/>
根据主机名进行限制:
<Valve className="org.apache.catalina.valves.RemoteHostValve" allow="abc.com" deny=""/>
<contextpath=”/myapp” reloadable=”true” docBase=”/var/www/myapp”>
<valueclassName=”org.apache.catalina.values.RemoteAddrValue”
allow=”127.0.0.1” deny=”″ />
</context>
标签:ali serve style 虚拟目录 XML bsp 访问 valve rem
原文地址:https://www.cnblogs.com/centos2017/p/9257593.html