Project

General

Profile

Can't get redmine running with phusion passenger

Added by Neville Franks almost 14 years ago

I have been very happily using Redmine for nearly 2 years now, however I updated my server from PHP V4 to V5 and MySQL V4 to V5 and along the way Redmine broke. The person who installed Redmine no longer works for me and his install notes were minimal. He used FastCGI and Apache but it would timeout regularly. So I've decided to start from scratch and after reading the Forums discovered phusion passenger, which sounds great.

I have installed phusion passenger, and updated rails and the mysql gem. I have Ruby 1.8.7 installed and am using CPanel/WHM on a VPS.

I downloaded and installed Redmine 0.9.3 into a fresh test CPanel Account.

There are the installed Gems.
actionmailer 2.3.5
actionpack 2.3.5
activerecord 2.3.5
activeresource 2.3.5
activesupport 2.3.5
cmdparse 2.0.2
fastthread 1.0.7
fcgi 0.8.7
highline 1.4.0
mysql 2.8.1
passenger 2.2.11
rack 1.0.1
rails 2.3.5
rake 0.8.7
rubygems-update 1.3.6
scgi_rails 0.4.3
sources 0.0.1

My database.yaml entry is:
production:
adapter: mysql
database: surfulc5_redmine
host: localhost
username: surfulc5_redmine
password: xxxx
encoding: utf8

I've updated /usr/local/apacche/conf/httpd.conf to include:
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11
PassengerRuby /usr/bin/ruby

and added:

<VirtualHost *:80>
ServerName surfulaterc5.com
ServerAlias www.surfulaterc5.com ## ServerName vps.myquickref.com/~surfulc5
DocumentRoot /home/surfulc5/public_html/redmine/public
<Directory "/home/surfulc5/public_html/redmine/public"> ## AllowOverride all
Options -MultiViews
Options FollowSymLinks
Allow from all
</Directory> ## RailsBaseURI /redmine
</VirtualHost>

I have tried various settings here.

There is another vhost for this domain:

<VirtualHost 207.58.155.150:80>
ServerName surfulaterc5.com
ServerAlias www.surfulaterc5.com
DocumentRoot /home/surfulc5/public_html
ServerAdmin
UseCanonicalName Off
CustomLog /usr/local/apache/domlogs/surfulaterc5.com combined
CustomLog /usr/local/apache/domlogs/surfulaterc5.com-bytes_log "%{%s}t I .\n{%s}t %O ." ## User surfulc5 # Needed for Cpanel::ApacheConf
<IfModule mod_suphp.c>
suPHP_UserGroup surfulc5 surfulc5
</IfModule>
<IfModule concurrent_php.c>
php4_admin_value open_basedir "/home/surfulc5:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
php5_admin_value open_basedir "/home/surfulc5:/usr/lib/php:/usr/local/lib/php:/tmp"
</IfModule>
<IfModule !concurrent_php.c>
<IfModule mod_php4.c>
php_admin_value open_basedir "/home/surfulc5:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
</IfModule>
<IfModule mod_php5.c>
php_admin_value open_basedir "/home/surfulc5:/usr/lib/php:/usr/local/lib/php:/tmp"
</IfModule>
<IfModule sapi_apache2.c>
php_admin_value open_basedir "/home/surfulc5:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
</IfModule>
</IfModule>
<IfModule !mod_disable_suexec.c>
SuexecUserGroup surfulc5 surfulc5
</IfModule>
ScriptAlias /cgi-bin/ /home/surfulc5/public_html/cgi-bin/

  1. To customize this VirtualHost use an include file at the following location
  2. Include "/usr/local/apache/conf/userdata/std/2/surfulc5/surfulaterc5.com/*.conf"

</VirtualHost>

Redmine is installed in public_html/redmine. If I open: http://vps.myquickref.com/~surfulc5/redmine/ I get a directory listing. The same with http://vps.myquickref.com/~surfulc5/redmine/public/ I have renamed .htaccess so it isn't used, which I've gathered is what should be done from reading forum posts. If I leave .htaccess I get a 404 Not Found for http://vps.myquickref.com/~surfulc5/redmine/public/

Note that there is no Domain surfulaterc5.com registered as this is just a test account. The account is accessed using: http://vps.myquickref.com/~surfulc5 There is a test CMS installed in the c5 folder.

I have tried with and without dispatch.cgi and dispatch.rb

I have searched the FAQ, How To's, Forum and the Web and am well and truly stuck, hence this post.

I am afraid I am pretty much out of my depth now and would greatly appreciate any help anyone can offer.

Thanks,
Neville, http://www.surfulater.com


Replies (16)

RE: Can't get redmine running with phusion passenger - Added by Felix Schäfer almost 14 years ago

Passenger/rails doesn't work as php in the sense that you don't "go to the URL" of a file and call it.

In your case: put the redmine directory somewhere outside of your html root and make a symlink from your_html_root/redmine to the_redmine_dir/public, then tell your virtualhost RailsBaseURI /redmine and it should work.

RE: Can't get redmine running with phusion passenger - Added by Neville Franks almost 14 years ago

Thanks Felix, I'll try that tomorrow. Does that mean the dispatch.cgi, dispatch.rb etc. and .htaccess are not used?

RE: Can't get redmine running with phusion passenger - Added by Felix Schäfer almost 14 years ago

The .htaccess would get used because it would appear to your apache in your_html_root/redmine/.htaccess, but IIRC the .htaccess makes problems with passenger, so leave it away. Not sure about the dispatchers, but I haven't had to anything with them on my passenger installation, so I don't think apache will do anything with them.

RE: Can't get redmine running with phusion passenger - Added by Wolfgang Pinitsch almost 14 years ago

same problem with debian lenny, is there a solution or is it a bug or a problem with my configuration?

RE: Can't get redmine running with phusion passenger - Added by Felix Schäfer almost 14 years ago

I think the configuration is still wrong. Please post your vhost config, and make sure to include it in tags so it's readable.

RE: Can't get redmine running with phusion passenger - Added by Wolfgang Pinitsch almost 14 years ago

<VirtualHost *:80>
    DocumentRoot /var/www
    PassengerResolveSymlinksInDocumentRoot On
    PassengerEnabled On
    PassengerLogLevel 3
    PassengerAppRoot /root/redmine
    RailsBaseURI /redmine
    <Directory /var/www/redmine>
      Options -MultiViews
      Allow from all
    </Directory>
</VirtualHost>

RE: Can't get redmine running with phusion passenger - Added by Wolfgang Pinitsch almost 14 years ago

Website: http://83.142.83.70/redmine/

root@83-142-83-70:~# gem list

*** LOCAL GEMS ***

actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.10)
fastthread (1.0.7)
gem_plugin (0.2.3)
mysql (2.8.1)
passenger (2.2.11)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7, 0.8.3)
ruby-openid (2.1.7)

RE: Can't get redmine running with phusion passenger - Added by Wolfgang Pinitsch almost 14 years ago

and when i restart my webserver , error.log

[Mon May 10 17:17:28 2010] [notice] SIGHUP received.  Attempting to restart
[Mon May 10 17:17:28 2010] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
[Mon May 10 17:17:28 2010] [notice] mod_python: using mutex_directory /tmp
[Mon May 10 17:17:28 2010] [notice] Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 Phusion_Passenger/2.2.11 PHP/5.2.6-1+lenny8 with Suhosin-Patch mod_python/3.3.1 Python/2.5.2 mod_ssl/2.2.9 OpenSSL/0.9.8g configured -- resuming normal operations

RE: Can't get redmine running with phusion passenger - Added by Felix Schäfer almost 14 years ago

Something like that should work (or at least does for me):

<VirtualHost *:80>
    DocumentRoot /var/www
    PassengerEnabled On
    PassengerLogLevel 3
    <Directory /var/www>
      Options -MultiViews
      Allow from all
      RailsBaseURI /redmine
    </Directory>
</VirtualHost>

And /var/www/redmine should be a symlink to the_redmine_dir/public, but you seem to have that right.

RE: Can't get redmine running with phusion passenger - Added by Wolfgang Pinitsch almost 14 years ago

i did:

ln -s /root/redmine/public /var/www
chown -R www-data:www-data /var/www/redmine
lrwxrwxrwx  1 www-data www-data    20 10. Mai 11:45 redmine -> /root/redmine/public
apache2ctl restart

RE: Can't get redmine running with phusion passenger - Added by Felix Schäfer almost 14 years ago

Looks good. I'm almost out of ideas to be honest. Maybe a permission problem? See if changing the rights of the whole redmine directory and children to www-data:www-data works, I seem to remember passenger bulging on root-owned applications.

RE: Can't get redmine running with phusion passenger - Added by Wolfgang Pinitsch almost 14 years ago

no, i tried everythinh i found as hint, but no luck at all :(

RE: Can't get redmine running with phusion passenger - Added by Felix Schäfer almost 14 years ago

Well, it seems to be running on the URL you gave me above…?

RE: Can't get redmine running with phusion passenger - Added by Wolfgang Pinitsch almost 14 years ago

no i installed a bitnami stack image to have it running ;)

RE: Can't get redmine running with phusion passenger - Added by Felix Schäfer almost 14 years ago

Ah, well, that's a solution too :-)

    (1-16/16)