Proxy pass and query string question

Ankur Gupta ankur655 at
Sun Jul 19 00:34:43 MSD 2009


1.  Is it possible to have proxy_pass be applicable to query_string variable
without using the location directive?  I was not able to make this work in
the configuration file.


    if ($query_string ~* "a=1") {
           proxy_pass http://proxy1;

   doesn't work unless its within a location directive

2.  If the location directive is necessary then how do I make it get past
the location directive if query string doesn't match?


 location ~ /foo    {
    if ($query_string ~* "a=1") {
           proxy_pass http://proxy1;
    If query string doesn't match I want to go further and check against
other location directives etc. How can that be done?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list