Static files should be in /root/static and configured to be served static.
Am 2011-09-26 08:32, schrieb Jorge Gonzalez:
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.
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive:
http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/