Using correct variable for proxy_pass

Rob Fulton rob at cow-frenzy.co.uk
Wed Nov 21 08:53:40 UTC 2018


Hi,

On 19/11/2018 13:12, Maxim Dounin wrote:
>
> If you want to use variables in the proxy_pass and at the same
> time want to preserve effect of nginx internal URI changes such as
> due to rewrites, consider using an empty URI compontent in the
> proxy_pass.  For example:
>
>     set $backend "http://example.com";
>     proxy_pass $backend;
>
Thanks for the guidance however we are proxying to a specific folder on 
our backend servers, i.e

set $backend "http://example.com/blue/content";

proxy_pass $backend

Is there a way to make this work in this scenario?

Regards

Rob



More information about the nginx mailing list