I try 2 way to config wsgi to use Django for my site. my root project file is in /var/run/myApp. this is my wsgi.py :
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'myApp.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
1.I install everything that need to run Django on apache and using centos as OS. I use this site to run wsgi.I use this command to setup my server :
mod_wsgi-express setup-server wsgi.py --port=80 --user test --group test --server-root=/var/run/myApp/mod_wsgi-express-80
after that I run this command and everything is fine:
/var/run/myApp/mod_wsgi-express-80/apachectl start
but when I browse my site I get error 500 : Internal Server Error
2.I also already try another way to config apache conf file but I get this error in error_log of apache :
" Target WSGI script not found or unable to stat: /run "
and this is what I write in httpd.conf:
WSGIDaemonProcess mySite user=test group=test
WSGIProcessGroup mySite
<VirtualHost *:80>
WSGIScriptAlias / run/myApp/my_App/wsgi.py
<Directory run/myApp/my_App>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
what is problem? thanks.