It seems that Nginx can't support redirects when proxy_pass is set to variable. Is there a way to achieve this functionality e.g. somehow chain servers or other workaround? What is the reason why this is not supported?
.conf is:
proxy_pass $var;
proxy_redirect default;
Error message I get is:
nginx: [emerg] "proxy_redirect default" cannot be used with "proxy_pass" directive with variables
.conf is:
proxy_pass $var;
proxy_redirect default;
Error message I get is:
nginx: [emerg] "proxy_redirect default" cannot be used with "proxy_pass" directive with variables