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's gravatar image

srkiNZ84
26125
accept rate: 0%

closed 13 Oct '11, 22:31

rickross's gravatar image

rickross ♦♦
12.5k2814972

@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.

(13 Oct '11, 22:31) rickross ♦♦

The question has been closed for the following reason "Bug and problem reports belong elsewhere" by rickross 13 Oct '11, 22:31

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×156
×8

Asked: 13 Oct '11, 22:19

Seen: 161 times

Last updated: 13 Oct '11, 22:31

powered by OSQA