Django

Code

Changeset 6309

Show
Ignore:
Timestamp:
09/15/07 13:52:29 (1 year ago)
Author:
jacob
Message:

Fixed #4437: added notes to the modpython auth handler documentation about using the handler with Apache 2.2. Thanks to Paul Bissex for the beginnings of the patch, and Graham Dumpleton for the rest of the info.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/apache_auth.txt

    r4420 r6309  
    2222 
    2323    <Location /example/> 
    24         AuthType basic 
     24        AuthType Basic 
    2525        AuthName "example.com" 
    2626        Require valid-user 
     
    2929        PythonAuthenHandler django.contrib.auth.handlers.modpython 
    3030    </Location> 
     31     
     32.. admonition:: Apache 2.2 
    3133 
     34    If you're using Apache 2.2, you'll need to take a couple extra steps. 
     35     
     36    You'll need to ensure that ``mod_auth_basic`` and ``mod_authz_user`` 
     37    are loaded. These might be compiled staticly into Apache, or you might 
     38    need to use ``LoadModule`` to load them dynamically (as shown in the 
     39    example at the bottom of this note). 
     40         
     41    You'll also need to insert configuration directives that prevent Apache 
     42    from trying to use other authentication modules. Depnding on which other 
     43    authentication modules you have loaded, you might need one or more of 
     44    the following directives:: 
     45     
     46        AuthBasicAuthoritative Off 
     47        AuthDefaultAuthoritative Off 
     48        AuthzLDAPAuthoritative Off 
     49        AuthzDBMAuthoritative Off 
     50        AuthzDefaultAuthoritative Off 
     51        AuthzGroupFileAuthoritative Off 
     52        AuthzOwnerAuthoritative Off 
     53        AuthzUserAuthoritative Off 
     54         
     55    A complete configuration, with differences between Apache 2.0 and 
     56    Apache 2.2 marked in bold, would look something like: 
     57     
     58    .. parsed-literal:: 
     59     
     60        **LoadModule auth_basic_module modules/mod_auth_basic.so** 
     61        **LoadModule authz_user_module modules/mod_authz_user.so** 
     62     
     63        ... 
     64     
     65        <Location /exmaple/> 
     66            AuthType Basic 
     67            AuthName "example.com" 
     68            **AuthBasicAuthoritative Off** 
     69            Require valid-user 
     70 
     71            SetEnv DJANGO_SETTINGS_MODULE mysite.settings 
     72            PythonAuthenHandler django.contrib.auth.handlers.modpython 
     73        </Location> 
     74         
    3275By default, the authentication handler will limit access to the ``/example/`` 
    3376location to users marked as staff members.  You can use a set of