Skip to content
This repository has been archived by the owner on Aug 3, 2020. It is now read-only.

Debian Linux (lenny) apache2 with mod_rails configuration issues.

dishanker edited this page Sep 13, 2010 · 3 revisions

Debian Linux (lenny) apache2 with mod_rails configuration issues and correction.

I initially ran into some unexpected Phusion Passenger (mod_rails) error browser pages deploying this app.

If you get an error like “path to visage root” is not a valid Ruby on Rails app root when you e.g. hit http://web.server.com/visage/, you need to modify your apache2 configuration file for your hostname.

First setup ‘ruby’ etc. and ‘passenger’ according to these instructions (hopefully it’s still there :-): http://articles.slicehost.com/2009/7/3/debian-lenny-installing-passenger-with-apache

If you like me want to provide visage as a sub URI /visage to your [virtual]host web.server.com, then do the following after setting up ruby on rails and passenger using the link above:

1.) $ cd /var/www
$ sudo ln -fs “path to visage root”/public/ visage

2.) Add these lines to your /etc/apache2/sites-enabled/web.server.com (or 000-default if you are just ‘localhost’):
PassengerAppRoot “path to visage root”
RackBaseURI /visage
RackEnv production # can skip this line, but see ‘passenger’ documentation

Make sure everything within directory “path to visage root” and itself is owned by user ‘www-data’ and group ‘www-data’. And also set ‘chmod 755’ recursively to “path to visage root” just to be certain :-).

3.) Restart apache using: $ sudo apache2ctl restart

The visage “Rails on Rack” app should now execute as it should without errors or a blank page on debian.

Other improvements added to this recipe are alright I guess ;-).
— Dishanker Raj