I configure NGINX for frontend. Backend is a set of programs running on different ports (6600, 6005 etc).
I try up NGINX for users work on the 80 port only and connecting on the other ports execute NGINX.
proxy_redirect's, proxy_pass's and sub_filter's manage normally. But I can't solved one problem:
In the one moment program redirect user via 302 code status. In the this response is contained location like /page.php?back=http%3A//127.0.0.1%3A6600/
I need change this IP 127.0.0.1 in the URL on the host IP.
But this URL contained in the head HTTP-response and NGINX options proxy_redirect, proxy_pass and sub_filter not help this.
I need change this URL in response, otherwise users backing on the main page on the localhost and that's all.
Do you know, how to NGINX can change this URL in the HEAD-response (user must be get 304-return with location like /page.php?back=http%3A//192.168.100.100%3A6600/