Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

According to the Apache 2.2 documentation, after a successful authentication against Active Directory the LDAP attributes specified in the AuthLDAPUrl directive should be available as environment variables with the default prefix AUTHENTICATE_.

However, on a Debian 6.0.4 + Apache 2.2.16 + mod_wsgi the env vars are not set. I can authenticate without issues, and everything else is working fine.

Is there something I can do to have them set? A newer version of Apache and/or LDAP module?

share|improve this question
up vote 1 down vote accepted

Have you looked in the WSGI environ dictionary passed to the WSGI application?

Any variables set using the SetEnv directive or internal equivalents in Apache, do not end up in os.environ of WSGI applications. Instead they end up in per request environ dictionary.

share|improve this answer
You are absolutely correct, thank you. – alexandrul Feb 16 '12 at 6:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.