Project

General

Profile

Redirection when using external apache proxy -> internal mod_rails / redmine deployment

Added by Anonymous over 15 years ago

Dear forum,

I am struggling with the following issue. I am trying to setup an external access point to our internal redmine installation. The external URL is http://proxy.my.tld/redmine ... When accessing this, the rails log shows the following:

Processing WelcomeController#index (for 192.168.1.10 at 2008-10-31 16:03:35) [GET]
Session ID: 7e2262b6179edab6b36742cc1d9f4706
Parameters: {"action"=>"index", "controller"=>"welcome"}
Redirected to http://proxy.my.tld/login
Filter chain halted as [#<ActionController::Filters::ClassMethods::SymbolFilter:0xb6a03d48 @filter=:check_if_login_required>] rendered_or_redirected.
Completed in 0.31197 (3 reqs/sec) | DB: 0.00000 (0%) | 302 Found [http://proxy.my.tld/]

Of course, http://proxy.my.tld/login does not exist and it should be http://proxy.my.tld/redmine/login. So it tries to redirect using the address of the proxy. Can I nail it down to only use the address of the internal server?

Thanks for any help in advance.

Kind regards,

Martin


Replies (6)

RE: Redirection when using external apache proxy -> internal mod_rails / redmine deployment - Added by Thomas Lecavelier over 15 years ago

Dear forum,

It's monday morning, no need to get hurt that early in the week. The four letters answer will wait. But coffee can't. Maybe stickies should be appear in very big, or Submit button bind to a manual copy of the guidelines. Hum... Where's my cold pills?

http://www.redmine.org/boards/2/topics/show/667

RE: Redirection when using external apache proxy -> internal mod_rails / redmine deployment - Added by Anonymous over 15 years ago

To comply to the "how to request help" topic:

Redmine version 0.7.2
Rails version 2.0.2
ruby 1.8.6 (2007-09-24 patchlevel 111) [i486-linux]
Ubuntu hardy virtual machine
mysqld Ver 5.0.51a-3ubuntu5.1-log for debian-linux-gnu on x86_64 ((Ubuntu))
mod_rails (passenger) version 2.0.3

Hope that this is the info that was requested in previous post.

RE: Redirection when using external apache proxy -> internal mod_rails / redmine deployment - Added by Anonymous over 15 years ago

So can someone please shed some light on why redmine does not support proxing from subdirectories? Or is really just me not being able to configure this?

RE: Redirection when using external apache proxy -> internal mod_rails / redmine deployment - Added by Thomas Lecavelier over 15 years ago

A little of this, a little of that... r1905 which is in trunk, not in 0.7.3.

RE: Redirection when using external apache proxy -> internal mod_rails / redmine deployment - Added by Harry Yamamoto over 15 years ago

To make the mod_rails supoort sub directories, do as follows:

1,make a symlink from your Ruby on Rails application's public folder to a directory in the document root. For example:ln -s /railapps/redmine/public /var/www/redmine.
here, 'redmine' is your redmine app folder. 'www' is your Apache's document root directory.

2,Next, add a RailsBaseURI option to the virtual host configuration: like this:
<VirtualHost *:80>
ServerName proxy.my.tld
DocumentRoot /var/www/
RailsBaseURI /redmine # This line should be added.
</VirtualHost>

Then restart Apache. The application has now been deployed.

    (1-6/6)