[Catalyst] fastcgi script returns 404

Jorge Gonzalez jorge.gonzalez at daikon.es
Mon Sep 26 06:32:52 GMT 2011


El 24/09/11 13:23, Richard Thomas escribió:
> On 24/09/2011, at 5:41 PM, Jorge Gonzalez wrote:
>
>> And this is my apache configuration for reverse proxying to Starman:
>>
>> ProxyPass               /       http://localhost:3000/
>> ProxyPassReverse        /       http://localhost:3000/
>> <Directory /home/myapp/MyApp/root>
>>      Options FollowSymLinks
>>      AllowOverride None
>> </Directory>
>> Alias   /css/   /home/myapp/MyApp/root/css/
>> Alias   /img/   /home/myapp/MyApp/root/img/
>> Alias   /js/    /home/myapp/MyApp/root/js/
>>
>> (I know this could be better :-)
>>
>> For running the app from the main app directory:
>>
>> starman -Ilib script/myapp.psgi -p 3000 --workers 3
>>
>> No problems so far, using the same configuration in 4 applications in heavy production use.
>>
>> Regards
>> J.
>>
> There must be some Rewrite Rules in the mix here as well, surely? I'm trying to get this set-up going, but am having two issues:
>
> - All generated links refer to localhost:3000

You can avoid this by using Plugin::SmartURI in "relative" mode, AND 
assuring ALL of your URLs in your app are generated via uri_for method. 
No need for rewrite rules in Apache.

> - The Catalyst app is still attempting to serve all the static content
Sorry, I pasted some prior Apache configuration version by mistake! 
These are my real "Alias" sections for Apache:

Alias   /css/   /home/myapp/MyApp/root/css/
<Location "/css">
         SetHandler default-handler
</Location>

Alias   /img/   /home/myapp/MyApp/root/img/
<Location "/img">
         SetHandler default-handler
</Location>

Alias   /js/    /home/myapp/MyApp/root/js/
<Location "/js">
         SetHandler default-handler
</Location>

Hope it works for you.
Regards
J.




More information about the Catalyst mailing list