RubyOnRails

Dtc, Rails and Apache2 with mod_fcgi

First:
You should have apache2, and therefore also you have to install dtc 0.21 (currently available only from cvs). Second, if you need version 1.4.8, best option is to backport the one from SID. To do it, just add the deb-src from sid, do a "apt-get source ruby", install the build-essential, and type dpkg-buildpackage -rfakeroot -us -uc. This should produce the necessary packages you need (and war if some dev package are missing).

After that:

  • copy/past the part corresponding to the vhosts you will install rails from /usr/share/dtc/etc/vhosts.conf to an new file you will make in /etc/apache2/sites-enabled/ (call it for example "001-myvhosts")
  • In dtc control panel go to "subdomains" select the subdomain you are installing rails, and select "no" on "Generate a vhost entry for this subdomain:"
  • In the "public" folder off your rails app you will have to edit ".htaccess" to:
RewriteEngine On
# General Apache options
#COMMENTED OUT#AddHandler fastcgi-script .fcgi
#COMMENTED OUT#AddHandler cgi-script .cgi
AddHandler fcgid-script .fcgi
Options +FollowSymLinks +ExecCGI
[...]
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
#COMMENTED OUT#RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
[...] 

Then check: http://wiki.rubyonrails.com/rails/pages/Debian+mod_fastcgi+Notes(approve sites)

Editing this page means accepting its license.

Page last modified on July 07, 2006, at 10:33 AM EST