Conditional rule

Vincent MAUGE vmauge at gmail.com
Wed May 12 21:13:00 MSD 2010


Sorry for the previous partial email.

Hey,

I need to add conditional rule with more than one test.
I need something like :
if ($remote_addr != "aa.bb.cc.dd" && $request_uri !~  ^/XXXXX$)
{
   rewrite ...
}
else{
  proxy_pass ...
}

I don't find the good nginx syntax to obtain a such behaviour.
I try :
if ( )  {
   if () {
  }
}
without success

What is the proper way to do such condition ?

Vincent



More information about the nginx mailing list