How to configure the nginx->nginx->passenger (redmine) for the correct return location parameter?

This:

1. ReverseProxy (nginx) — fronthost (address https://sub.domain.ru)
2. Nginx + Passenger (redmine 3.4.2) - internalhost (address 192.168.0.1)

Problem:
1. Authorized users at the exit (transition to: https://sub.domain.ru/logout) obtained from the Passenger a HTTP 302 with the Location parameter: http://192.168.0.1/ in the response headers
2. After submitа form on the page https://sub.domain.ru/login (POST method) in the header of the response returns Location: http://192.168.0.1/my/page with HTTP 302

fragment of nginx configuration file for internalhost (generated automatically):
server {
 listen 80;
 listen 443;
 server_name sub.domain.ru;

 root /var/www/redmine/public;
 passenger_enabled on;
 client_max_body_size 10m; # Max attachemnt size

 error_page 500 502 503 504 /50x.html;
 location = /50x.html {
 root html;
}
}


Where to dig to Redmine return public url https://sub.domain.ru in location?

Update:
Tried to add in the nginx configuration
"proxy_redirect" http://192.168.0.1/my/page https://sub.domain.ru/my/page;

did not help
June 14th 19 at 20:51
1 answer
June 14th 19 at 20:53
listen 443;
Why not ssl enabled??
Where to dig to Redmine return public url https://sub.domain.ru in location?
Why not just take it with sponsirovat?
Or You are quite definitely asked the question(although maybe I tuplyu)), or it's all trite, but why do You not see?
https://nginx.ru/ru/docs/http/ngx_http_proxy_modul...

Find more questions by tags NginxPassengerRedmine