2

I've started a new Django project for Openshift following the github example.

According to this openshift post the project folder structure can be simplified. I tried this so now, I only have setup.py openshift wsgi.py files in my repo root. Having this, I tried to serve static files with apache with the following .htaccess:

RewriteEngine On
RewriteRule ^application/static/(.+)$ /static/$1 [L]

But it does not work. It only works if I recreate the wsgi directory and place static folder under it (modifying settings and config files to find them there ofc.).

I guess it is something related with the .htaccess but don't know how to modify it in order to find static files in the repo root folder.

Any guesses?

argaen
  • 4,145
  • 24
  • 28

1 Answers1

1

wsgi.py is the default WSGI entry-point. For backward compatibility, the wsgi/application path is selected as default WSGI entry-point with higher priority. You can customize the path using the OPENSHIFT_PYTHON_WSGI_APPLICATION environment variable.

niharvey
  • 2,807
  • 2
  • 15
  • 24