Tomcat中限制ip访问
十二月 26th, 2009 Posted in Tomcat | 阅读次数: 1,180 次
Author:gaojinbo
Time:2009-12-26
Tomcat中限制ip访问是非常简单的,只需要编辑server.xml文件即可
vi server.xml
找到context区域,如
<context path=”/gaojinbo” reloadable=”true” docBase=”/opt/www/gaojinbo”>
<value className=”org.apache.catalina.values.RemoteAddrValue” allow=”" deny=”127.0.0.1″ />
</context>
说明:只限制127.0.0.1访问
如要限制192.168.1.0-192.168.5.255和192.168.10.0-192.168.15.255
deny=”192.168.[1-5].*,192.168.[10-15].*”
完成!
相关日志:
Tags: Tomcat
七月 9th, 2011 at 21:29
Cooler sites…
[...]we came across a cool web-site which you could delight in. Take a look for those who want[...]……
十二月 10th, 2011 at 16:13
最近我也遇到这个问题,有个外国ip恶意提交评论,想给他ip屏蔽了,在Tomcat加配置这个方法不爽吧,如果要增加一个ip咋办,还得ftp进入空间修改配置文件,太麻烦了
一月 28th, 2012 at 19:45
[...]the time to read or visit the content or sites we have linked to below the[...]……
[...]here are some links to sites that we link to because we think they are worth visiting[...]……
二月 6th, 2012 at 11:48
[...]The information mentioned in the article are some of the best available [...]……
[...]below you’ll find the link to some sites that we think you should visit[...]……