[Catalyst] Where do templates/static files go under Apache?
Adam Jacob
adam at stalecoffee.org
Wed Jun 7 06:49:53 CEST 2006
On Jun 6, 2006, at 7:40 PM, Dr. Jennifer Nussbaum wrote:
> hi, i have my Cat application runing well using the test server. i
> set it up
> like everything was generated for me, pretty much:
>
> MyApp/lib/MyApp.pm
> MyApp/lib/MyApp/Model/Catalog.pm [etc]
> MyApp/root/list.tt
> MyApp/root/header.tt [etc.]
> MyApp/root/static/myapp.css
>
> In my templates i link my static stuff with href="[% base %]static/
> myapp.css", and this all works with the testserver
>
> Now i want to move to running under Apache/mod_perl, but none of
> the docs are clear on where to move the templates and static files
> so that Apache can find them. i want to do this without changing my
> configuration so i can keep using the test server for development.
> Where do things go, or what do I tell Apache about where to find
> them? For the main app i usually do things like
> <Location /incomings>
> SetHandler perl-script
> PerlHandler MyApp
> </Location>
>
> and them make sure MyApp.pm (and everything under it) is in my Perl
> path.
>
> Thank you! this should be in the dox.
You can do something like:
<Location /myapp>
SetHandler perl-script
PerlResponseHandler MyApp
</Location>
Alias /myapp/static /path/to/myapp/root/static
<Directory "/path/to/myapp/root/static">
Order allow,deny
Allow from all
</Directory>
<Location /myapp/static>
SetHandler default-handler
</Location>
Adam
More information about the Catalyst
mailing list