Ped*_*ran 11 reverse-proxy nginx
我正在尝试配置nginx以proxy_pass根据我的请求中的POST/GET/PUT/DELETE参数执行操作.
我想proxy_pass,以http://10.0.0.2:8000是否live=1或http://10.0.0.2:8081是否live=0.
我试过使用if ($arg_live = "1")但它只适用于GET请求.
谢谢,
佩德罗
我建议你试试这个..
if ($request_method = 'POST') {
#your_directives_here
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
14536 次 |
| 最近记录: |