so there is no way to do what I am trying to do?<br>I see I could make rewrites. the problem with that is that it won&#39;t be transparent to the application underneath.<br>I know there is a lua module. maybe there is a way to do it with lua?<br>
<br>as I said, I just need to be able to match on headers and uri and decide to which upstream to pass the request.<br><br><div class="gmail_quote">On Thu, Apr 7, 2011 at 8:42 PM, Ivan <span dir="ltr">&lt;<a href="mailto:bdfy@mail.ru">bdfy@mail.ru</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>nginx doesn&#39;t have a rich programming language :). if - it is only a new localtion :).<br><br>see this example:<br><br><a href="http://markmail.org/message/yv6x3z66x3a5jdv2" target="_blank"></a><a href="http://markmail.org/message/yv6x3z66x3a5jdv2" target="_blank"></a><a href="http://markmail.org/message/yv6x3z66x3a5jdv2" target="_blank">http://markmail.org/message/yv6x3z66x3a5jdv2</a><br>
<br>š<br>Thu, 7 Apr 2011 19:33:25 -0300 ÐÉÓØÍÏ ÏÔ Jonathan Leibiusky &lt;<a href="mailto:ionathan@gmail.com" target="_blank">ionathan@gmail.com</a>&gt;:<br><br><blockquote style="border-left: 1px solid rgb(8, 87, 166); margin: 10px; padding: 0pt 0pt 0pt 10px;">
<div><div><div></div><div class="h5">hi! first I wanted to say that nginx is a great product!<br>I am trying to use it to route my traffic with several different rules. This way I can do ab testing.<br>My rules use different inputs, like http headers and uri of the request.<br>

I am using right now the location block with regex. But when I need to do something more complex (like matching the query string and http_method) I can&#39;t find a way to do it as it seems like nginx doesn&#39;t have a rich programming language, which is reasonable. But I am sure there are ways to do what I want, like:<br>

<br>location ~ /items.* {<br>š if ($query_string ~ .*&amp;ids=.* &amp;&amp; $request_method = GET) {<br>ššš proxy_pass pool_a;<br>š }<br>š proxy_pass pool_b;<br>}<br><br>this is just an example, my rules can get more complex. what would be the recommended way to address this?<br>

<br>thanks!<br><br>jonathan<br></div></div>

_______________________________________________<br>
nginx mailing list<br>
<a href="http://sentmsg?compose&amp;To=nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank"></a><a href="http://nginx.org/mailman/listinfo/nginx" target="_blank"></a><a href="http://nginx.org/mailman/listinfo/nginx" target="_blank"></a><a href="http://nginx.org/mailman/listinfo/nginx" target="_blank"></a><a href="http://nginx.org/mailman/listinfo/nginx" target="_blank"></a><a href="http://nginx.org/mailman/listinfo/nginx" target="_blank"></a><a href="http://nginx.org/mailman/listinfo/nginx" target="_blank"></a><a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>

<br>
</div></blockquote><br></div>
<br>_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
<br></blockquote></div><br>