Reputation: 1
I am having a trouble hosting static images in Openshift 2014. I have tried quite a bit with htaccess setting files etc after going through internet. The problem seems to be Openshift's change in directory patterns. It has removed folders such as wsgi https://www.openshift.com/blogs/openshift-online-march-2014-release-blog.
Can anyone kindly help me in figuring out this problem?
Observations
debug=true
mode. Upvotes: 0
Views: 794
Reputation: 51
I got the same problem: Not getting the Template Repository Layout after deploying Python 2.7 on openshift
After inspecting the Apache configuration on the server, I found that wsgi/static
is still served statically by Apache. So I simply did this in my repo:
mkdir wsgi
cd wsgi
ln -s ../mypackage/static
In addition you can add the following line your build hook to serve the media files
if [ ! -d $OPENSHIFT_DATA_DIR/media ]; then
mkdir $OPENSHIFT_DATA_DIR/media
fi
ln -sf $OPENSHIFT_DATA_DIR/media $OPENSHIFT_REPO_DIR/wsgi/static/media
Upvotes: 1