Defect #13077
closedredirect to wrong back_url behind Apache reverse proxy
0%
Description
I've configured my Apache proxy exactly as described in http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_in_a_sub-URI#With-a-reverse-proxy but Redmine redirects to a wrong URL by removing the path "/redmine". Hence, I cannot login and use the system. It works well with the local domain.
That happens after migration from 1.4 to the latest version 2.2.2 and seem to be independent of the 'Settings->General->Host name and path'.
It does not help either, if I change the environment.rb and set any combination of Redmine::Utils::relative_url_root or ActionController::Base.relative_url_root.
I also tried to enable/disable the browsers referer options but it didn't help.
Environment:
Rails 3.2.11 Ruby 1.9.3-p374 Redmine 2.2.2 r11293
Settings->General->Host name and path:
subdomain.domain.tld/redmine
Proxy config:
ProxyPass /redmine http://localserver:3000/ ProxyPassReverse /redmine http://localserver:3000/
Now, the requested URL
http://subdomain.domain.tld/redminechanges to
http://subdomain.domain.tld/login?back_url=http%3A%2F%2Fsubdomain.domain.tld%2F
Related issues