[Catalyst] FastCGI url handling

Jules Bean jules at jellybean.co.uk
Wed Nov 23 12:53:20 CET 2005


Carl Franks wrote:
> I've been looking at catalyst lately, but am not sure how I could use
> it with my current hosting setup. Any advice would be appreciated.
> 
> I have shared hosting with fast-cgi on apache 1.3
> 
> I would like the catalyst app to be served from a subfolder, say '/myapp'
> How can I get url's such as /myapp/products or /myapp/checkout to be
> routed to a fast-cgi script?
> 
> I've tried adding a .htaccess file at /myapp/.htaccess containing the following
> Options +ExecCGI
> SetHandler fastcgi-script
> Action fastcgi-script /home/user/cgi-bin/test.cgi
> 
> If I move test.cgi into the /myapp directory, it runs ok, but if I try
> to view any other url such as /myapp/products, it fails with something
> such as the following in my error logs
> FastCGI: invalid (dynamic) server "/home/user/docs/myapp/products":
> script not found or unable to stat()
> 
> I was under the impression that the 'SetHandler' would make all urls
> under that directory be handled by fast-cgi, and the 'Action' would
> direct all fast-cgi handled calls go to the named test.cgi
> - obviously I'm mistaken!
> 
> Is what I'm trying to do possible?


I haven't used that precise setup, but if it was just plain CGI, I'd 
expect the following URL to work:

/myapp/test.cgi/products

...have you tried variations on that theme?

(you may want to set a <BASE HREF="[%c.base%]"> or something similar in 
your templates to help them not care about stuff like this)

Jules



More information about the Catalyst mailing list