Привет!<br>Бекенды кладут в куку JSESSIONID постоянную часть, каждый свою.<br>Например k3t2 - это сервер номер 3, томкат на порту 8020<br>Хочется заворачивать клиентов по этим данным.<br>Написана такая конфигурация <br>             if ( $cookie_JSESSIONID ~ k(\d)t(\d)$ ) {<br>
                 set $i $1; <br>                 set $p $2;<br>                 proxy_pass  &quot;<a href="http://10.0.0.">http://10.0.0.</a>${i}:80${p}0&quot;;<br>             }<br>Получаю 500 ошибку<br>Текст дебаглога:<br>
<br>2009/07/22 19:58:02 [notice] 22554#0: *265 &quot;k(\d)t(\d)$&quot; matches &quot;C8E1CD03759419B1D76EB8BCC576DCD9.k3t2&quot;, client: 10.1.1.180, server: <a href="http://testhost.com">testhost.com</a>, request: &quot;GET /book/nginx-logo.png HTTP/1.1&quot;, host: &quot;<a href="http://testhost.com">testhost.com</a>&quot;, referrer: &quot;<a href="http://testhost.com/serv/">http://testhost.com/serv/</a>&quot;<br>
2009/07/22 19:58:02 [debug] 22554#0: *265 http script if<br>2009/07/22 19:58:02 [debug] 22554#0: *265 http script complex value <br>2009/07/22 19:58:02 [debug] 22554#0: *265 http script capture: &quot;3&quot;<br>2009/07/22 19:58:02 [debug] 22554#0: *265 http script set $i <br>
2009/07/22 19:58:02 [debug] 22554#0: *265 http script complex value<br>2009/07/22 19:58:02 [debug] 22554#0: *265 http script capture: &quot;2&quot;<br>2009/07/22 19:58:02 [debug] 22554#0: *265 http script set $p<br>2009/07/22 19:58:02 [debug] 22554#0: *265 post rewrite phase: 3<br>
2009/07/22 19:58:02 [debug] 22554#0: *265 generic phase: 4<br>2009/07/22 19:58:02 [debug] 22554#0: *265 generic phase: 5<br>2009/07/22 19:58:02 [debug] 22554#0: *265 access phase: 6<br>2009/07/22 19:58:02 [debug] 22554#0: *265 access: B401010A FFFFFFFF 151F3AD4<br>
2009/07/22 19:58:02 [debug] 22554#0: *265 access phase: 7<br>2009/07/22 19:58:02 [debug] 22554#0: *265 post access phase: 8<br>2009/07/22 19:58:02 [debug] 22554#0: *265 malloc: 0000000014F2C2D0:4096<br>2009/07/22 19:58:02 [debug] 22554#0: *265 http script copy: &quot;<a href="http://10.0.0">http://10.0.0</a>.&quot;<br>
2009/07/22 19:58:02 [debug] 22554#0: *265 http script var: &quot;3&quot;<br>2009/07/22 19:58:02 [debug] 22554#0: *265 http script copy: &quot;:80&quot;<br>2009/07/22 19:58:02 [debug] 22554#0: *265 http script var: &quot;2&quot;<br>
2009/07/22 19:58:02 [debug] 22554#0: *265 http script copy: &quot;0&quot;<br>2009/07/22 19:58:02 [debug] 22554#0: *265 http init upstream, client timer: 0<br>2009/07/22 19:58:02 [debug] 22554#0: *265 epoll add event: fd:9 op:3 ev:80000005<br>
2009/07/22 19:58:02 [error] 22554#0: *265 zero length URI to proxy, client: 10.1.1.180, server: <a href="http://testhost.com">testhost.com</a>, request: &quot;GET /site/nginx-logo.png HTTP/1.1&quot;, host: &quot;<a href="http://testhost.com">testhost.com</a>&quot;, referrer: &quot;<a href="http://testhost.com/serv/">http://testhost.com/serv/</a>&quot;<br>
<br>Можно ли реализовать такую функциональность штатными средствами, или надо писать патч?<br>