[Catalyst] OT Apache question

Toby Corkindale toby.corkindale at strategicdata.com.au
Fri Nov 28 03:05:19 GMT 2008


Jesse Sheidlower wrote:
> A few weeks ago I asked a series of questions about caching,
> at the end of which discussion it was suggested that I use
> Apache, instead of Cat with the Static::Simple plugin, to
> serve my static files. I had tried this once before and ran
> into problems and given up, so, the question:
> 
> I'd prefer to keep my current directory setup, in which I have
> my Cat applications, in the usual configuration, under
> /usr/local/www/modules. So, for example, my "incomings"
> database is at /usr/local/www/modules/Incomings, its
> templates are at /usr/local/www/modules/Incomings/root (so
> Static::Simple serves them normally), the controllers are at
> (for example)
> /usr/local/www/modules/Incomings/lib/Incomings/Controller/Search.pm,
> and so forth.
> 
> However my document root is at /usr/local/www/data, which
> obviously does not include /usr/local/www/modules. So, if I
> try to follow the Static::Simple suggestion of adding, say,
> 
> <Location /Incomings/static>
> 	SetHandler default-handler
> </Location>
> 
> this obviously won't work because /Incomings/static isn't in
> fact under my document root, it's in the filesystem at
> /usr/local/www/modules/Incomings/root/static/. Trying this
> just gives me 404's for all of the static stuff (CSS, images,
> JS).
> 
> How do I configure Apache to serve these files, without
> reorganizing what is by now a rather complicated directory
> structure?

Could you use the apache Alias directive?

Alias /Incomings/static/ /usr/local/www/modules/Incomings/root/static/

-tjc

-- 
Strategic Data Pty Ltd
Ph: 03 9340 9000



More information about the Catalyst mailing list