Python – How to serve static files with apache on openshift official python cartridge

apache-2.2openshift-online-2pythonstatic-files

I have scalable openshift online app with official python-2.7 cartridge. By default everything is served with mod_wsgi handler. How do I configure my app and/or Apache to serve some static files in my repo (like images, css and javascript) with Apache instead of python backend?

Best Answer

Just figured it out by examining the cartridge source. Files in $OPENSHIFT_REPO_DIR/wsgi/static folder are served by Apache directly. Its completely undocumented though, and may break in the future.