A
A
Adgh2017-10-02 17:20:39
Nginx
Adgh, 2017-10-02 17:20:39

How to set up the nginx->nginx->passenger (redmine) bundle to correctly return the location parameter?

Given:
1. ReverseProxy (nginx) - fronthost (address of the form https://sub.domain.ru)
2. Nginx + Passenger (redmine 3.4.2) - internalhost (address of the form 192.168.0.1)
Problems:
1. Authorized users upon exit (following the link: https://sub.domain.ru/logout) receive HTTP 302 from Passenger with the parameter Location: http://192.168.0.1/in the response headers
2. After the form is submitted on the page https://sub.domain.ru/login(POST method), Location is returned in the response headers: http://192.168.0.1/my/pagewith HTTP 302
nginx config fragment on 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 so that Redmine returns the public view url https://sub.domain.ruin location?
Update:
Tried adding to nginx settings
proxy_redirect            http://192.168.0.1/my/page https://sub.domain.ru/my/page;

did not help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Mukovoz, 2017-10-02
@castomi

listen 443;
Why is ssl not enabled??
Where to dig so that Redmine returns a public url like https://sub.domain.ru in location?
And why actually not just take it with a proxy?
Or you didn’t ask the question accurately enough (although maybe I’m stupid)) or everything is banal here, but why don’t you see it?
https://nginx.ru/en/docs/http/ngx_http_proxy_modul...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question