h1. MojoMojo Running via External FastCGI
MojoMojo is avant-garde wiki software that uses the Catalyst Framework and a buttload of CPAN modules. External FastCGI is useful for separating the application processes from the web server. MojoMojo, being a Catalyst application, gives you a FastCGI enabled application for free. Once you've gotten MojoMojo installed, it's easy as pie to configure apache to use external FastCGI instances of MojoMojo. Read on to find out how.
FastCGI is an CGI done right. It is designed to improve peformance and scalability of CGI. A distinct advantage of running FastCGI instances in their own process space is the separation of application processes from the web server. Thus application restarts don't require web server restarts which is real handy for times when the site is busy but the application most be restarted.
FastCgiExternalServer /var/www/virtual-file.fcgi -host remote.host.org:3001 Alias /cia-wiki/ /var/www/virtual-file.fcgi/
The directories must exist but the filename is arbitary.
mojomojo_fastcgi.pl -l :3001 -n 3 -p /home/hunter/mojo_fastcgi.pid -d
This starts 3 fastcgi instances on port 3001, puts a process id in the mojo_fastcgi.pid, file and puts fastcgi in daemon mode.
h2. Make an init script
I have not tested it yet, but it appears an init script for starting FastCGI Catalyst app. can be created using Catalyst::Helper::FastCGI::ExternalServer. Another possibility for managing FastCGI processes is FCGI::Engine::Manager
A much more in depth article about using external FastCGI server with Catalyat applications is avaialable
h2. Foot Notes
fn1. The absolute path must exist and be readable by the fastcgi process, but the filename at the end is virtual (just used for mapping of fastcgi process to the URI) so it can be anything.