Trouble with somewhat complex proxy config

Alexandr Gomoliako zzz at zzz.org.ua
Thu Dec 15 02:28:36 UTC 2011


> map $arg_needle $needle_host {
>    default   '127.0.0.1:3000';
>    ~^  $arg_needle.somehost.com;
> }

Or a bit more efficient, without regexes:

map $arg_needle $needle_host {
    default  $arg_needle.somehost.com
    ''   '127.0.0.1:3000';
}



More information about the nginx mailing list