pythondjangojelastic

Unable to render Django app with Jelastic


I want to render my Django with jelatic.

I cloned my Django app on jelastic. enter image description here

I configured my Postgres database and modified my settings.py so that my app is connecting to my database.

enter image description here

Finally to render my app I run this in the SSH : python manage.py runserver And everything seems to work :

enter image description here

But I get this response on my browser:

enter image description here

Any help will be appreciated =)


Solution

  • So i found out how to modify apache server file to put your own django web app on Jelastic solution:

    Go to the file : /etc/httpd/conf.d/wsgi.conf

    Do these modification:

    #----------  Put this in comment line ----------
    
    #Alias /images /var/www/webroot/ROOT/images
    #Alias /static /var/www/webroot/ROOT/static
    
    #WSGIScriptAlias / ${WSGI_SCRIPT}
    #WSGIProcessGroup apache
    
    #----------  Add those code line ----------
    
    
    WSGIScriptAlias / /path/to/mysite.com/mysite/wsgi.py
    WSGIPythonHome /path/to/venv
    WSGIPythonPath /path/to/mysite.com
    
    <Directory /path/to/mysite.com/mysite>
    <Files wsgi.py>
    Order deny,allow
    Allow from all
    </Files>
    </Directory>
    
    Alias /media/ /path/to/mysite.com/media/
    Alias /static/ /path/to/mysite.com/static/
    
    <Directory /path/to/mysite.com/static>
    Order deny,allow
    Allow from all
    </Directory>
    
    <Directory /path/to/mysite.com/media>
    Order deny,allow
    Allow from all
    </Directory>