Welcome! Log In Create A New Profile

Advanced

Proxy pass and query string question

Ankur Gupta
July 18, 2009 04:34PM
Hi,

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.

Specifically:

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?

eg:

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?


Thanks,
Ankur
Subject Author Posted

Proxy pass and query string question

Ankur Gupta July 18, 2009 04:34PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 158
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready