[Catalyst] Serving server-dependent static content

Peter Lytle pete at bluecampaigns.com
Sun Aug 12 19:22:28 GMT 2007


Good afternoon - I am working on a Catalyst application that serves dynamic
website content for multiple sites, and I've run into some difficulty about
static content.  Each website has unique static content (images, css, rss)
and I am trying to serve that static content from the site's unique
directory.  I have found lots of documentation on how to serve all static
content from a single directory, but not much on a servername-dependent
directory.  For example:
 
Request:  http://www.timjohnson.com/css/global.css
Should be served with:  /var/www/html/sites/timjohnson.com/css/global.css
 
I came close to making this happen just using the Alias directive in
httpd.conf, but I couldn't get that to accept a variable, %{SERVER_NAME}, in
it.  If someone has a solution from the Apache side, that's fine but I
suspect that it might be easier to do this with
Catalyst::Plugin::Static::Simple, though I again have not figured out how to
tell it to use a variable name when it creates the path the request is
supposed to be mapped to.  I am sending this to the Catalyst list because I
suspect it might be something other people have faced before using Catalyst.
 
My setup is a recent version of Catalyst running on Apache 2.2 with
mod_perl.  Any suggestions would be quite welcome - thank you very much.
 
 


Peter Lytle
_________________________________________________________


Blue Campaign Solutions


Peter Lytle, Principal


pete at bluecampaigns.com  <mailto:pete at bluecampaigns.com> 


www.bluecampaigns.com <http://www.bluecampaigns.com/> 


Phone: 202.742.2737


Cell: 614.893.4603


Fax: 866.727.1883


 <http://www.bluecampaigns.com/> 


 


 

 

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070812/c651febf/attachment.htm


More information about the Catalyst mailing list