I'm trying to get OSQA installed on CentOS6, which comes with python 2.6 out of the box. I've gone through the install and have managed to get through most of the problems, but am now stuck. I get the following error from the logs when I try to access the site:
[Thu Oct 13 21:48:58 2011] [error] [client 192.168.2.10] ImproperlyConfigured: Error importing middleware forum.middleware.extended_user: "No module named forum.middleware.extended_user"
From what I understand, this is because mod_wsgi isn't loading the OSQA libraries. However, I have included the path in osqa.wsgi:
import os
import sys
sys.path.append('/opt')
sys.path.append('/opt/osqa')
# The first part of this module name should be identical to the directory name
# of the OSQA source. For instance, if the full path to OSQA is
# /home/osqa/osqa-server, then the DJANGO_SETTINGS_MODULE should have a value
# of 'osqa-server.settings'.
os.environ['DJANGO_SETTINGS_MODULE'] = 'OSQA.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
The only thing I can think of is that I've commented out some of the WSGI* directives in the apache config:
#NOTE: all urs below will need to be adjusted if
#settings.FORUM_SCRIPT_ALIAS !='' (e.g. = 'forum/')
#this allows "rooting" forum at [http://example.com/forum], if you like
WSGISocketPrefix run/wsgi
#WSGIPythonHome /opt/ActivePython-2.6
#WSGIPythonEggs /var/python/eggs
<VirtualHost *:80>
ServerAdmin admin@userfeedback
DocumentRoot /opt/OSQA/forum
ServerName userfeedback
#run mod_wsgi process for django in daemon mode
#this allows avoiding confused timezone settings when
#another application runs in the same virtual host
WSGIDaemonProcess OSQA
WSGIProcessGroup OSQA
#force all content to be served as static files
#otherwise django will be crunching images through itself wasting time
Alias /m/ /opt/OSQA/forum/skins/
Alias /upfiles/ /opt/OSQA/forum/upfiles/
Alias /admin_media /usr/lib/python2.6/site-packages/django/contrib/admin/media/
<Directory /opt/OSQA/forum/skins>
Order allow,deny
Allow from all
</Directory>
#this is your wsgi script described in the prev section
WSGIScriptAlias / /opt/OSQA/osqa.wsgi
CustomLog /var/log/httpd/OSQA/access_log common
ErrorLog /var/log/httpd/OSQA/error_log
</VirtualHost>
By the way, I've followed the CentOS guide found here, but using the built-in python install.
asked
13 Oct '11, 22:19
srkiNZ84
26●1●2●5
accept rate:
0%
@srkiNZ84, this posting is more a problem report than a question. OSQA bugs should be reported at jira.osqa.net, and OSQA support issues should go to support@osqa.net.