readme.md
1.84 KB
java nginx 配置文件
说明
这些文件需要
copy
到openresty
的home
目录
IP block endpoints
-
Remove blocked ip
: http://erp.yoho.yohoops.org/malIp?method=pubDel&ips=1.2.3.4,1.2.3.5 -
Add to block ip
: http://erp.yoho.yohoops.org/malIp?method=pubAdd&ips=1.2.3.4,1.2.3.5&expire=110000 -
Remove all block ip
: http://erp.yoho.yohoops.org/malIp?method=flushAll -
Retrive all block ip
: http://erp.yoho.yohoops.org/malIp?method=queryAll
upstream
的支持
动态基于 lua-upstream-nginx-module 动态设置upstream的 up
, down
- 查询所有的
upstreams
信息:
curl -i -H "Host: erp.yoho.yohoops.org" "http://127.0.0.1/upstreams?method=list&upstream=apigateway"
- 设置
upstream
名称为apigateway
的upstream
第0个backend server
状态为down
:
curl -i -H "Host: erp.yoho.yohoops.org" "http://127.0.0.1/upstreams?method=down&upstream=apigateway&id=0"
- 设置
upstream
名称为apigateway
的upstream
第0个backend server
状态为up
:
curl -i -H "Host: erp.yoho.yohoops.org" "http://127.0.0.1/upstreams?method=up&upstream=apigateway&id=0"
list 接口响应:
{
"name": "apigateway",
"value": [
{
"backup": false,
"name": "172.31.70.77:8080",
"down": false,
"id": 0
},
{
"backup": false,
"name": "172.31.70.113:8080",
"down": false,
"id": 1
},
{
"backup": false,
"name": "172.31.70.8:8080",
"down": false,
"id": 2
},
{
"backup": false,
"name": "172.31.70.104:8080",
"down": false,
"id": 3
}
]
}