level 2
xyc2501314
楼主
我现在有一套系统 nginx+tomcat
我需要达到如下要求:
1,比如有ip访问 http://192.168.1.100/test/api/xyc/list?name=xx 这个url,我需要设置Ip访问的限制
10秒只给其访问10次,超过就报503
2,访问 http://192.168.1.100/test/api/xyc/list?name=xx 这个url其实Nginx是转发到 http://192.168.1.100:8080/test/api/xyc/list?name=xx tomcat上的
我自己写的是这样,但是试了好多次,貌似都没用,求大神指点,多谢
limit_zone limit $binary_remote_addr 10m;
limit_conn_log_level info;
server {
listen 80;
location ^~ /test {
limit_conn limit 1;
alias /home/xyc/web/;
}
2016年09月22日 04点09分
1
我需要达到如下要求:
1,比如有ip访问 http://192.168.1.100/test/api/xyc/list?name=xx 这个url,我需要设置Ip访问的限制
10秒只给其访问10次,超过就报503
2,访问 http://192.168.1.100/test/api/xyc/list?name=xx 这个url其实Nginx是转发到 http://192.168.1.100:8080/test/api/xyc/list?name=xx tomcat上的
我自己写的是这样,但是试了好多次,貌似都没用,求大神指点,多谢
limit_zone limit $binary_remote_addr 10m;
limit_conn_log_level info;
server {
listen 80;
location ^~ /test {
limit_conn limit 1;
alias /home/xyc/web/;
}