Electronics & Programming


Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » Solved: Re: Still mystified by [not a] mod_wsgi traceback ... [RSS Feed]

#1 Jan. 3, 2011 23:55:02

Stephen W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Solved: Re: Still mystified by [not a] mod_wsgi traceback ...

Ach, permissions problem. After I disabled the error message in
d.c.a.m.RemoteUserMiddleware, I got an error message about the
database not being writable -- I'm using sqlite and forgot that
the *directory* containing the db file has to be writable (for the
temp file). Doh! So the real problem that the
d.c.a.m.AuthenticationMiddleware message got triggered by was that
the User it tried to create couldn't be saved (I infer) -- not a
very good error message for that! (mod_wsgi works just fine! ;)


On 01/03/2011 04:36 PM, Stephen Waterbury wrote:I posted the traceback I'm getting --http://dpaste.com/293813/I'm still completely mystified. The traceback directs me to:
"Edit your MIDDLEWARE_CLASSES setting to insert
before the RemoteUserMiddleware class." But looking further
up in the traceback, it sees that d.c.a.m.AuthenticationMiddleware
*is* there, and it's true -- I already have it in my
MIDDLEWARE_CLASSES setting before the RemoteUserMiddleware class,
so how could mod_wsgi possibly not be finding it?

See below for more details on my configuration ...


On 12/30/2010 06:17 PM, Stephen Waterbury wrote:I am baffled, and it's probably something simple I'm missing ...
I just need to send a message for help and then I'll see it ...
(maybe ... ;)

My set up:
* apache2 on Ubuntu 10.04
* mod_wsgi 3.3, compiled with python 2.6.5 (the system python)
(but Ubuntu's mod_wsgi package was apparently not the problem)
* django installed in a virtualenv with python 2.6.5 also
* 2 django apps, one running on ':80' virtual host and one on
':8000' virtual host, each with a separate wsgi script (of course)
* apache server config (apache.conf) has WSGIPythonHome directive:
'WSGIPythonHome '
* virtualenv directory has python interpreter in its bin dir and
python packages installed in its lib dir, including all django
* I have verified that AuthenticationMiddleware can be imported
successfully from the command line within the virtualenv using
the virtualenv's python intepreter
* both django apps live within the virtualenv directory,
each in its own "project" directory there
* both apps are configured in apache with WSGIDaemonProcess directive

The error I continue to get is:

"ImproperlyConfigured at /

"The Django remote user auth middleware requires the
authentication middleware to be installed. Edit your
MIDDLEWARE_CLASSES setting to insert
'django.contrib.auth.middleware.AuthenticationMiddleware' before
the RemoteUserMiddleware class."

The relevant sections of the settings.py files for the apps are:


Ultimately I'll be using Active Directory (Kerberos) auth, but for
purposes of testing the REMOTE_USER stuff I've configured Basic
Authentication, and it is working (I authenticate successfully
before seeing that error message).

Any suggestions welcome! (I can send the whole error page if it
would help, but I'll need to launder it a little.)

You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.


  • Root
  • » Django
  • » Solved: Re: Still mystified by [not a] mod_wsgi traceback ... [RSS Feed]

Board footer

Moderator control

Enjoy the 13th of December

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support