[Twisted-Python] what is the best way to serve static files?

Phil Christensen phil at bubblehouse.org
Tue Apr 22 08:51:18 MDT 2008


On Apr 21, 2008, at 11:42 PM, inhahe wrote:
> What is the best (fastest) way to serve static files with Twisted?   
> Or would using Apache or lighttpd for static files significantly  
> speed it up (i don't know how to do this, btw)?
> Thx.

If you want to serve your static files with apache, you'll want to  
look into the ReverseProxy directive. Then you can just define Alias  
directives that override your various asset URLs.

I like having my Twisted web app setup so it can serve static files,  
using the same URLs I have aliased in Apache. Then I can omit Apache  
for development, but use it for production without changing any paths.

-phil




More information about the Twisted-Python mailing list