[Answer]-Exception occurred processing WSGI script

1👍

try to reconfigure the WSGI lik this for example by defining a general path for the project and apache

osqa.wsgi :

import os, sys

#path to directory of the .wgsi file ('[directory]/')
wsgi_dir = os.path.abspath(os.path.dirname(__file__))

# path to project root directory (osqa '/')
project_dir = os.path.dirname(wsgi_dir)

# add project  directory to system's Path
sys.path.append(project_dir)
sys.path.append('/home/fuiba/webapps/osqa/osqa')


os.environ['PYTHON_EGG_CACHE'] = '/home/fuiba/webapps/osqa/osqa/.python-egg'
#add the setting.py file to your system's path
project_settings = os.path.join(project_dir,'settings')

#explicitly define the DJANGO_SETTINGS_MODULE
os.environ['DJANGO_SETTINGS_MODULE'] ='osqa.settings'

import django.core.handlers.wsgi
application =django.core.handlers.wsgi.WSGIHandler()

in the http.conf :

keep only the WSGIScriptAlias in the virtualhost, the path going to be already define in the wsgi file

WSGIScriptAlias / /home/fuiba/webapps/osqa/osqa.wsgi
WSGIScriptReloading On
WSGIProcessGroup domain.com
WSGIDaemonProcess domain.com user=user processes=10 threads=1 maximum-requests=500

it should work if libapache2_mod_wsgi is installed too

Leave a comment