[Catalyst] What to upload

Chris hutchinson.chris at gmail.com
Tue Apr 6 23:57:48 GMT 2010

> Below is what they said.  I tried everything I found by googling which is why I thought
> I must not be reading something correctly...
> "Hello Paul,
> mod_fastcgi is available. You would need to setup the appropriate fast cgi hooks in your .htaccess file so that it processes the scripts. For example, the following would parse fcg, fcgi, and fpl files as fast cgi scripts:
> AddHandler fastcgi-script fcg fcgi fpl"
 It looks like the same setup as provided by our ISP. We put the
'appname.fcgi' script from app/scripts into the web directory with a
'use lib' to the app code outside the web root, and have mod_rewrite
push web requests through the script.

You can check it's working without rewrite by calling
http://your.website/appname.fcgi - it should run your webapp. If you
have ssh to the account then try running the .fcgi file from the
command line - that will reveal any compile errors - you should get a
pipe error from fcgi if everything is set up correctly.

We leave /static to be handled by apache.

Our .htaccess looks like this:
AddHandler fastcgi-script .fcgi
RewriteEngine On

# force oursite.com to www.oursite.com
RewriteCond %{HTTP_HOST}   !^www\.oursite\.com [NC]
RewriteCond %{HTTP_HOST}   !^$
RewriteRule ^(.*)         http://www.oursite.com/$1 [L,R]

# exclude /static and process everything else using fastcgi
RewriteCond %{REQUEST_URI} !^/static
RewriteCond %{REQUEST_FILENAME} !oursite.fcgi
RewriteRule ^(.*)$ oursite.fcgi/$1 [PT,L]

- Chris

More information about the Catalyst mailing list