2

我已经在我的服务器上安装了 Redmine 2.0.3,它一切正常,只是当你登录时 URL 被弄乱了,所以它无法正确重定向。如果您在登录后手动输入正确的 URL,则可以正常工作。

我得到的网址是:

http://redmine.mydomain.comhttp%3a%2f%2fredmine.mydomain.com%2f

这个 URL 是在哪里生成的/我该如何修复它?

谢谢。

马丁

4

1 回答 1

2

我的设置有一个启用了 SSL 的“主”Apache httpd 和 mod_proxy 到 Redmine v2.1.2 的单独 apache 实例。

我遇到了我认为是 Rails 而不是 Redmine 本身的问题。

生产日志:

Started GET "/redmine/projects/test/issues/new" for 127.0.0.1 at Tue Dec 11 
07:31:31 -0800 2012
Processing by IssuesController#new as HTML
  Parameters: {"project_id"=>"test"}
  Current user: anonymous
Redirected to http://myserver/redmine/login?back_url=http%3A%2F%2Fmyserver%2F
redmine%2Fprojects%2Ftest%2Fissues%2Fnew
Filter chain halted as :authorize rendered or redirected
Completed 302 Found in 155ms (ActiveRecord: 98.4ms)

Started GET "/redmine/login?back_url=http%253A%252F%252Fmyserver%252Fredmine%252F
projects%252Ftest%252Fissues%252Fnew" for 127.0.0.1 at Tue Dec 11 07:31:31 -0800 
2012
Processing by AccountController#login as HTML
  Parameters: {"back_url"=>"http%3A%2F%2Fmyserver%2Fredmine%2Fprojects%2Ftest%2F
  issues%2Fnew"}
  Current user: anonymous
  Rendered account/login.html.erb within layouts/base (11.4ms)
Completed 200 OK in 399ms (Views: 351.9ms | ActiveRecord: 37.7ms)
Started POST "/redmine/login" for 127.0.0.1 at Tue Dec 11 07:32:17 -0800 2012
Processing by AccountController#login as HTML
  Parameters: {"username"=>"speroshiropetto", "back_url"=>"http%3A%2F%2Fmyserver
  %2Fredmine%2Fprojects%2Ftest%2Fissues%2Fnew", "login"=>"Login »", "utf8"=>"?", 
  "authenticity_token"=>"D4wruy76o/adfhafnen30kS6b2FtOQIaiFdtzbMxzs=", 
  "password"=>"[FILTERED]"}
  Current user: anonymous
Successful authentication for 'speroshiropetto' from 127.0.0.1 at Tue Dec 11 
15:32:17 UTC 2012
Redirected to http://myserverhttp%3A%2F%2Fmyserver%2Fredmine%2Fprojects%2Ftest%2F
issues%2Fnew
Completed 302 Found in 356ms (ActiveRecord: 176.4ms)

--------------------------------------------------------------------------------

将以下内容添加到 Redmine Apache 配置中会有所帮助。

RequestHeader set X_FORWARDED_PROTO 'https'

于 2012-12-12T00:37:03.090 回答