Loading...
This site is best viewed in a modern browser with JavaScript enabled.
Something went wrong while trying to load the full version of this site. Try hard-refreshing this page to fix the error.
proxy_pass upstream时,如何获取当前请求服务器信息?
huanchuanjian
Hi all:
在发起子请求时,有没有类似 ngx.var.upstream_addr, ngx.var.upstream_port 变量在 lua 里获得当前请求的后端服务器地址信息。
anymaybe
不太确定你想要的,如果是获取后端信息,upstream_addr这个变量就是。
http://nginx.org/en/docs/http/ngx_http_upstream_module.html#var_upstream_addr
在 2016年5月19日星期四 UTC+8下午4:33:54,宦传建写道:
Hi all:
在发起子请求时,有没有类似 ngx.var.upstream_addr, ngx.var.upstream_port 变量在 lua 里获得当前请求的后端服务器地址信息。