Multiple instance of redmine does not work with passenger

Bug #624598 reported by Stefano Lenzi on 2010-08-26
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
redmine (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: redmine

After setting up multiple instance of redmine with
dpkg-reconfigure redmine
if they are accessed by means of apache + fastcgi everything works correctly, while if they are accessed by means of apache + passenger they do not work. In particular, the problem with passenger is that the first instance of redmine accessed by the browser will be the only instance accessible regardless of the URL used.

I have attached the apache configuration that proves the reported issue. If you want to test it you have to:
0 - install the packages redmine, passenger, libapache2-mod-fcgid, and libfcgi-ruby1.8
1 - create two instance of redmine called redalpha and redbeta
2 - add the line 127.0.1.1 redalpha redbeta to the file /etc/hosts
3 - disable the fastcgi module and enable the passenger module by typing a2enmod passenger && a2dismod fcgid
4 - copy the attched file in /etc/apache2/sites-available/ and enable them with a2ensite redalpha redbeta
5 - restart apache
6 - from the machine access to http://redalpha/, login as admin and create a project called alpha-project
7 - from the machine access to http://redbeta/ and you will see the alpha-project created
8 - enable fcgid and disable passenger by typing a2enmod fcgid && a2dismod passenger
9 - restart apache
10 - from the machine access to http://redalpha/ and you will see the alpha-project project
11 - from the machine access to http://redbeta/ and you will see no project at all

As you can see from the procedure above the steps 6 and 7 shows the issue with passenger, which goes away as soon as fcgid is used (see steps 10 and 11)

I hope it can help,
Stefano "Kismet" Lenzi

Stefano Lenzi (kismet-sl) wrote :

You can also have a look at the thread
http://www.redmine.org/boards/1/topics/16647
on the Redmine website, which I created and gives more detail about the problem

summary: - Multiple instance of redmine does not works with passenger
+ Multiple instance of redmine does not work with passenger
kapouer (kapouer) wrote :

The problem at hand is that passenger spawns rails instance based on the application root path,
which is obviously the same in both virtualhosts.
Here's a quick fix :
cd /var/lib/redmine/redalpha
ln -s /usr/share/redmine passenger
cd /var/lib/redmine/redbeta
ln -s /usr/share/redmine passenger

Then add to redalpha virtualhost config :
PassengerAppRoot /var/lib/redmine/redalpha/passenger

and to redbeta virtualhost config :
PassengerAppRoot /var/lib/redmine/redbeta/passenger

Restart and you're done !

Stefano Lenzi (kismet-sl) wrote :

Thank you a lot!
I was expecting that the problem could simply rely on my passenger configuration.

In fact, I test your configuration and it works as expected :)

I think that we should add those advice to the README.Debian, because for newbies won't be easy to figure it out.

Moreover, I have tried your suggestion with the following symbolic link:
/var/www/redalpha/redmine -> /usr/share/redmine
/var/www/redbeta/redmine -> /usr/share/redmine
of course I have also changed the PassengerAppRoot directive to match my symbolic link

Thank you!

Changed in redmine (Ubuntu):
status: New → Fix Committed
Stefano Lenzi (kismet-sl) wrote :

I changed the status because I've noticed that the "The Natty Narwhal" package (redmine-1.0.2-3) contains the above information in samples directory.
See release 21 (http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/natty/redmine/natty/revision/21)

Ron Adams (tohuw) wrote :

This bug happened to me. Can we get a backport for this, to save other users the hassle? I'm on 10.04.2. It's a pretty trivial fix, so it doesn't seem like it would be too hard to backport.

JC Hulce (soaringsky) wrote :

This bug has been marked as Fix Committed for over a year. If the fix has made it into Ubuntu, please mark this bug as Fix Released. If the fix has been released upstream, but not Ubuntu, create a new bug asking for the new version and tag it with upgrade-software-version. If this bug has not been fixed anywhere, change the status back to Confirmed.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers