开发者

Tomcat6 : a way to apply a "global" accept/reject IP filter?

I've got a开发者_JS百科 tomcat6 servlet container which runs various applications, such as solr. I'd like to be able to specify which IP addresses that are allowed to access the server. Is there a way to "globally", for all servlets, to specify which IP adresses that can access any of the servlets?


I solved it by editing the servlet context.xml file. Event though it isn't a "global" solution, it did the track and allows me to filter access by IP address.

<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true">
    <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="[IPADDRESS]"/>
</Context>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜