samedi 11 juin 2016

Django website on Apache with wsgi failing


so i'm about to lunch my first django website , i currently have a server that has been configured to host php websites and i've decided to test a simple empty project to get familiar with the process

so the python version in this server is bit old (2.6) so i couldn't install latest version of django , i installed 1.6 and since it's just a test that's not important (im going to upgrade python version when my website is ready to lunch )

so i've installed django and created a new project called testing in this dire

/home/sdfds34fre/public_html/

which you can see using this domain

http://novadmin20.com

and after reading documentation on django (unfortunately they have removed doc for 1.6 and i had to use 1.9) and wsgi i've updated my httpd.conf like this

<VirtualHost 111.111.111.111:80>
    ServerName 111.111.111.111
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin somemeail@gmail.com
    <IfModule mod_suphp.c>
        suPHP_UserGroup nobody nobody
    </IfModule>

    <Directory /home/sdfds34fre/public_html/testing/testing>
        <Files wsgi.py>
            Require all granted
        </Files>
    </Directory>


    WSGIDaemonProcess testing python-path=/home/sdfds34fre/public_html/testing:/usr/lib64/python2.6/site-packages/
    WSGIProcessGroup testing
    WSGIScriptAlias / /home/sdfds34fre/public_html/testing/testing/wsgi.py


</VirtualHost>

but even after restarting httpd service when i go to

http://novadmin20.com/testing/

all i see is directory list , am i missing something ?

here is my wsgi.py file

"""
WSGI config for testing project.

It exposes the WSGI callable as a module-level variable named ``application``.

For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
"""

import os
import sys

sys.path.append(os.path.dirname(os.path.dirname(__file__)))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testing.settings")

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

Aucun commentaire:

Enregistrer un commentaire