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?
Asked
Active
Viewed 2,832 times
5
-
You mean _other than_ putting them in `/static`? – Michael Hampton Feb 25 '15 at 13:43
-
Michael Hampton, Putting files in `/static` doesn't help. As I said, with official python-2.7 cartridge *everything* is served via wsgi handler. – RSSCake Feb 26 '15 at 14:50
-
If you wanted to escape from the short comings of the OpenShift mod_wsgi setup, you could always consider doing what is described in http://blog.dscpl.com.au/2015/01/using-alternative-wsgi-servers-with.html This uses mod_wsgi-express and it is trivial to have it also host static files. – Graham Dumpleton Feb 27 '15 at 04:03
1 Answers
5
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.
-
I think the `/static` folder is the one you should use. Looking at the linked source, the `/wsgi/static` folder seems to be an alias for it. – Brecht Machiels Dec 01 '15 at 22:42