<div dir="ltr"><div>Hello,</div><div><br></div><div>I have configured:<br></div><div>1. ngx_lua as rewrite_by_lua_file</div><div>2. lua returns upstream</div><div>3. Nginx connects to the upstream</div><div>Works perfectly.</div>
<div><br></div><div>The question is how can I archive proxy_next_upstream. </div><div>Preferably I would like to return to lua with a error reason.</div><div>If the only way is to return several servers in upstream from lua, how to do so ?</div>
<div><br></div><div>I'm currently setting ngx.var.upstream and then proxy_pass http://$upstream. I suppose the simplest method would be to set the $upstream in correct format. But what about my preferably method?</div>
<br clear="all"><div>Cheers,<br>Jędrzej Nowak</div>
</div>