Would this work?

location ~ ^/users/v2/ {
proxy_pass http://app.domain.com/api/$1/v2;
}

No.

Would $1 resolve as users or does it need to be inside ()?

For capturing (PCRE) a block into variable you need ().

You can also use named variables if the pattern/configuration becomes more complex ( for example http://nginx.org/en/docs/http/server_names.html#regex_names )

rr
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to