I need to install Redmine on my company’s server and set it to run on
Apache + Passenger.
I’m able to run Redmine using Webrick, but when I try to run it on
Apache+Passenger it doesn’t work. I access the Redmine’s url in the
browser and I see a list of files instead of the Redmine’s main page. It
seems Passenger is not working.
Options -Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
After configuring these files like that I restarted Apache:
/etc/init.d/apache2 restart
I’m new with Linux and I’m not sure how to check if the module Passenger
is installed in Apache. I found the file
/usr/lib/apache2/modules/mod_passenger.so in the server, so does it
means that the module is installed?
I put redmine.cpro5331.publiccloud.com.br instead of ServerName
cpro5331.publiccloud.com.br/redmine but now I’m not able to access
redmine.cpro5331.publiccloud.com.br in the browser. The message says
that the server was not found.
Those lines are commented out because I don’t know if I should put them?
Should I take them out or uncomment them?
RailsBaseURI /redmine-2.0.3/public
PassengerResolveSymlinksInDocumentRoot on
Here is the result of the command before I change the file
/etc/apache2/sites-available/default:
apache2ctl -S
[Tue Jul 17 10:59:44 2012] [warn] module dav_svn_module is already
loaded, skipping
[Tue Jul 17 10:59:44 2012] [warn] module authz_svn_module is already
loaded, skipping
VirtualHost configuration:
wildcard NameVirtualHosts and default servers:
*:80 is a NameVirtualHost
default server cpro5331.publiccloud.com.br
(/etc/apache2/sites-enabled/000-default:1)
port 80 namevhost cpro5331.publiccloud.com.br
(/etc/apache2/sites-enabled/000-default:1)
port 80 namevhost cpro5331.publiccloud.com.br/svn
(/etc/apache2/sites-enabled/000-default:39)
port 80 namevhost cpro5331.publiccloud.com.br/redmine
(/etc/apache2/sites-enabled/000-default:49)
Syntax OK
Here is the result after changing it:
apache2ctl -S
[Tue Jul 17 11:10:44 2012] [warn] module dav_svn_module is already
loaded, skipping
[Tue Jul 17 11:10:44 2012] [warn] module authz_svn_module is already
loaded, skipping
VirtualHost configuration:
wildcard NameVirtualHosts and default servers:
*:80 is a NameVirtualHost
default server cpro5331.publiccloud.com.br
(/etc/apache2/sites-enabled/000-default:1)
port 80 namevhost cpro5331.publiccloud.com.br
(/etc/apache2/sites-enabled/000-default:1)
port 80 namevhost cpro5331.publiccloud.com.br/svn
(/etc/apache2/sites-enabled/000-default:39)
port 80 namevhost redmine.cpro5331.publiccloud.com.br
(/etc/apache2/sites-enabled/000-default:49)
Syntax OK
Thank you for your reply. I’m not sure if I understood very well what
you meant. You said the issue may be caused by the tag Directory that
hasn’t the same place as DocumentRoot, right? For example, here it would
be wrong:
[Tue Jul 17 11:26:56 2012] [notice] caught SIGTERM, shutting down
[Tue Jul 17 11:26:57 2012] [error] *** Passenger could not be
initialized because of this error: Unable to start the Phusion Passenger
watchdog because its executable
(/usr/lib/ruby/gems/1.8/gems/passenger-3.0.13/agents/PassengerWatchdog)
does not exist. This probably means that your Phusion Passenger
installation is broken or incomplete, or that your ‘PassengerRoot’
directive is set to the wrong value. Please reinstall Phusion Passenger
or fix your ‘PassengerRoot’ directive, whichever is applicable.
It seems Passenger was not installed correctly. I tried to install
Passenger using this command:
sudo passenger-install-apache2-module
It didn’t work and appeard this message:
WARNING: Apache doesn’t seem to be compiled with the ‘prefork’, ‘worker’
or ‘event’ MPM
Phusion Passenger has only been tested on Apache with the ‘prefork’, the
‘worker’ and the ‘event’ MPM. Your Apache installation is compiled with
the ‘itk’ MPM. We recommend you to abort this installer and to recompile
Apache with either the ‘prefork’, the ‘worker’ or the ‘event’ MPM.
How to compile Apache with prefork ? Is it hard to do ? May it cause any
problem? I’m afraid of doing this because I have some app running on
Apache.
[Tue Jul 17 11:26:57 2012] [error] *** Passenger could not be
initialized because of this error: Unable to start the Phusion Passenger
watchdog because its executable
(/usr/lib/ruby/gems/1.8/gems/passenger-3.0.13/agents/PassengerWatchdog)
does not exist. This probably means that your Phusion Passenger
installation is broken or incomplete, or that your ‘PassengerRoot’
directive is set to the wrong value. Please reinstall Phusion Passenger
or fix your ‘PassengerRoot’ directive, whichever is applicable.
It seems Passenger was not installed correctly.
You confirmed that the file referenced above doesn’t exist? And that
your PassengerRoot is correct? Because “not installed correctly” is
one of three possibilities there
How to compile Apache with prefork ? Is it hard to do ? May it cause any
problem? I’m afraid of doing this because I have some app running on
Apache.
And you have an app that’s not running. So download the source
and take a shot at it; test your applications on your dev/staging server
until you’re satisfied.
Or forget using Passenger and take the less intrusive (IMO) approach
of proxying to a cluster of unicorns or whatever. I prefer that because
of the flexibility to test or run with different backend servers,
anyway.
2 - Change the VirtualHost configuration to that:
<VirtualHost *:80>
ServerName cpro5331.publiccloud.com.br
DocumentRoot /var/www/redmine-2.0.3/public
RackBaseURI /
RailsEnv production
<Directory /var/www/redmine-2.0.3/public >
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
Now it’s ok and running =)
Thank you very much guys. Your tips were essencial for me to got it
working. I hope someone may benefit from my solution here.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.