views:

24

answers:

1

what's the best ways to mix static files and wsgi app served on the root directory?

http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide

recommends setting up

WSGIScriptAlias / /usr/local/www/wsgi-scripts/myapp.wsgi

and alias other directories and files:

Alias /robots.txt /usr/local/www/documents/robots.txt
Alias /favicon.ico /usr/local/www/documents/favicon.ico

Alias /media/ /usr/local/www/documents/media/

is there a cleaner way to do this?

+1  A: 

Nope. You need the Alias directives to override the WSGIScriptAlias directive when handling static media.

Ignacio Vazquez-Abrams