readme.md
1.47 KB
java nginx 配置文件
说明
这些文件需要
copy
到openresty
的home
目录
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=ufogateway"
- 设置
upstream
名称为ufogateway
的upstream
第0个backend server
状态为down
:
curl -i -H "Host: erp.yoho.yohoops.org" "http://127.0.0.1/upstreams?method=down&upstream=ufogateway&id=0"
- 设置
upstream
名称为ufogateway
的upstream
第0个backend server
状态为up
:
curl -i -H "Host: erp.yoho.yohoops.org" "http://127.0.0.1/upstreams?method=up&upstream=ufogateway&id=0"
list 接口响应:
{
"name": "ufogateway",
"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
}
]
}