Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Python cartridge - serving static files #5344

Open
radeksvarz opened this issue Apr 27, 2014 · 1 comment
Open

Python cartridge - serving static files #5344

radeksvarz opened this issue Apr 27, 2014 · 1 comment

Comments

@radeksvarz
Copy link

After Origin 2014 March release the Document root is set to the repo folder. The wsgi folder is suggested not to be used.

Django projects are typically collecting static files under ./static folder.

This creates the issues with serving static files as they are only accessible from within ./wsgi/static due to the backwards compatibility Apache script with Alias: https://github.com/openshift/origin-server/blob/master/cartridges/openshift-origin-cartridge-python/usr/versions/shared/etc/conf.d/openshift.conf.erb

WSGIScriptAlias / in fact is processed for all URLs except pre-defined Alias ( https://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide#Mounting_At_Root_Of_Site )

Using .htaccess RewriteRules thus do not have any influence.

Additionally static files are deleted during git push even when hot_deploy is activated. This is then visible several minutes.

Suggestions:

a) set the secondary alias towards ./static folder for serving static files (so we can get rid of wsgi/static folder) and create mechanism to keep the data during git push

b) Set the DocumentRoot to the www under data folder (django projects will create static subfolder and collect the static files there overwriting on each git push)

c) set the secondary alias towards data/static folder for serving static files in the case old wsgi setup is not used

@radeksvarz
Copy link
Author

Additional related issue is that /robots.txt /favicon.ico are accessible only through wsgi app instead of being server directly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants