Radiant CMS / Apache 2.0

Posted by tom July 17th, 2006

Today I’ve setup a RAILS app with the use of Apache2 and mod_fcgid. The RAILS app is Radiant CMS, which I’ve testdriven to see what it’s possibilities were. I’ve also looked at ease of use and that’s where Radiant CMS really scores. Radiant CMS is really, really easy to learn. It’s featureset is currently somewhat limited, though the first plugins (called behaviors) are already available (of which gallery & search are to me the most usable).

Getting RAILS up and running with Apache2 was not at all straightforward, there are many resources available on the web, but sadly they are not always correct. I’ve got it to work using mod_fcgid, with no changes to the RAILS app code (except two small things), but with some minor setup for mod_fcgid: <IfModule mod_fcgid.c> AddHandler fcgid-script .fcgi SocketPath /var/lib/apache2/fcgid/sock DefaultInitEnv RAILS_ENV production IdleTimeout 600 ProcessLifeTime 3600 MaxProcessCount 8 IPCConnectTimeout 8 IPCCommTimeout 48 </IfModule>
The setup for the site itself was pretty straightforward: DefaultInitEnv RAILS_ENV production <Directory /home/virtual/#sitename#/radiant/public/> Options ExecCGI FollowSymLinks AllowOverride All Order allow,deny allow from all </Directory> Do check the paths for your Ruby executable in dispatch.rb and dispatch.fcgi.
You might need to do some configuration for mysql, as not all sockets can be found in /tmp/mysql.sock. In my case it was /var/run/mysqld/mysqld.sock.
General tip: If your site does not work with Apache2, check your settings / permissions by running the app with WEBrick (good ol’ ruby script/server), but make sure it run’s as the same user as Apache2, that will give good indications whether things work or not. In my case it took me an hour to find out that the cache folder did not have the right permissions.

Leave a Reply