FCGI example setup for Apache + Ruby on Rails

Hi,

first post in the forum, I hope I found the right category.

I try to set up an redmine installation on an managed server with linux/apache, I’m not very familiar with ruby and rails.

I managed to install all the gems and following the install guide I finished the installation. Redmine works with the webrick server.

No I have problems with the FCGI integration, I always get an Error 500. I followed the instructions from my hosting company and the redmine docs - no success.

So the next step is to create a simple “hello world” ruby/rails/fcgi/apache test application.

My .htaccess is:
AddHandler fcgid-script .fcgi

RewriteEngine On
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"

my dispatch.fcgi is:
#!/bin/dash
export GEM_HOME="$HOME/.gem/ruby/2.3.0/"
export GEM_PATH="$GEM_HOME:/var/lib/ruby/gems/1.8"
exec /usr/bin/ruby /usr/www/users/admin/test/hello.rb

And hello.rb:
puts ‘Hello World!’

Didn’t work, I got the Error 500. What’s wrong or missing?

Thanks for any tipps
Klaus

Hey Klaus,

Check the REDMINE_ROOT/log/production.log and if that information couldn’t help you, please provide its content here.