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//

I need change this IP 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//

Thanks you!

  • You should fix this in the backend applications, so that they return proper URLs. Trying to fix this in nginx creates a complicated setup which leads to more difficult maintenance. – Tero Kilkanen Oct 6 '17 at 6:14
  • We not have access to backend for fix. The decision to use nginx for a layer between the backend and the user already implies an increase in the complexity of the service. We are ready for this. Specifically with this issue, I ask for advice in which direction to drip. – Piknik Oct 9 '17 at 8:52

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.