<div dir="ltr">Здравствуйте.<br><br>Помогите, пожалуйста, организовать редирект.<br><br>В сервере <a href="http://example.com">example.com</a> есть апстрим.<br><br>upstream site {<br> ip_hash;<br><br> server <a href="http://site1.example.com">site1.example.com</a>;<br>
server <a href="http://site2.example.com">site2.example.com</a>;<br> }<br><br>и есть location <br><br> location ^~ /one {<br> proxy_pass <a href="http://site/one">http://site/one</a>;<br>
proxy_redirect default;<br> }<br><br>Т.е. при обращении на <a href="http://example.com/one">example.com/one</a> он должен редиректиться на <a href="http://site1.example.com/one">site1.example.com/one</a> или <a href="http://site2.example.com/one">site2.example.com/one</a>. rewrite не подходит, так как мне нужен редирект с ip_hash. <br>
<br>Получаю "worker_connections is not enough while connecting to upstream" или "no live upstreams while connecting to upstream".<br><br>Насколько я понял, он зацикливается. Но никак не могу понять почему.<br>
</div>