[Catalyst] recommended/best practice way of serving static files after authentication?

Ash Berlin ash_cpan at firemirror.com
Tue Jul 28 13:55:41 GMT 2009

On 28 Jul 2009, at 14:42, John SJ Anderson wrote:

>  $WORK-mate is working on a Cat app that (among other things) allows
>  authenticated users to download from a set of static files. He's
>  wondering what the best way is to set things up so that the Cat app
>  can handle the authentication/authorization parts of things but then
>  hand the static file serving part off to Apache.
>  Thanks for any help/hints.
> john.

Largely depends on what webserver you are using. Lighttpd has X- 
LIGHTTPD-Sendfile (or something similarly named) nginx has something  
like X-Accel-Redirect which does the same (and can do more.) Both of  
these tell the webserver to serve static content from a file. Hit  
google for these env vars to find out how they work

There's an apache module which will do the same as the lighttpd one http://tn123.ath.cx/mod_xsendfile/ 
  Never used it mind.


More information about the Catalyst mailing list