[Catalyst] How to use fastcgi

John M. Dlugosz wxju46gefd at snkmail.com
Sat Mar 19 03:24:09 GMT 2011

I've set up my app on an Apache server using fastcgi.  Following the instructions in the 
"cookbook" and a few other places, The Virtual Server block looks something like this:

    ServerName www.ClientsDomainName.com
    ServerAlias CLientID.dlugosz.com
    ServerAlias ClientID.LocalCloneOfServer
    # Serve static content directly
    DocumentRoot "/var/www/MyApp/MyApp-0.01/root"
    Alias /static /var/www/MyApp/MyApp-0.01/root/static
    ErrorLog    /var/www/MyApp/MyApp-0.01/logs/error_log
    CustomLog    /var/www/MyApp/MyApp-0.01/logs/access_log combined

    FastCgiServer /var/www/MyApp/MyApp-0.01/script/MyApp_fastcgi.pl -processes 3
    Alias / /var/www/MyApp/MyApp-0.01/script/MyApp_fastcgi.pl/

I went with unpacking the archive within a base directory of the same name, so that the 
base directory can be given permissions different from the main www directory.

Any more suggestions and tips thus far?

My question at this point concerns reloading and cycling of the fastcgi server.  If I 
update the app's files, how do I reload it?  I didn't see any feature similar to the -r on 
the development server.  Looking at the process list, I see lots of Apache2 processes, 
none named fastcgi.  I'm guessing that the "fork" done by Apache doesn't change the 
process name and command-line identification?  So I can't just kill them off because I 
don't know which ones they are!

More information about the Catalyst mailing list