2010-01-14 5 views
1

I 그러나 두 번째 서버가 메시지를 다시로드 할 때와 동일한 구성 및 에러를 수락하지 않는 다른 서버에 WSGI 인증 작업있다 : 여기 알 수없는 Authn 공급자 : wsgi ... 실패!

Syntax error on line 12 of /etc/apache2/sites-enabled/mydomain.com 
Unknown Authn provider: wsgi 
    ... fail 

는 설정 파일의 중요한 부분이다 (행 12 WSGIAuthUserScript이고 ...)

<Location /adirectory/> 
    AuthType Basic 
    AuthName "Answer me these questions two" 
    AuthBasicProvider wsgi 
    WSGIAuthUserScript /home/auser/domains/mydomain.com/apache/auth_test.wsgi 
    Require valid-user 
</location> 

WSGIPassAuthorization On 

그리고 auth_test.wsgi 파일 :

def check_password(environ, user, password): 

    if user == 'someusername': 
     if password == 'asecretpassword': 
      return True 
     return False 

    return None 

모드-wsgi.conf 및 모드 - WSGI .load가 모두 사용 가능합니다. 물론/something/different가 있어야하지만, 나는 손실에 처해있다.

+0

WSGIAuthUserScript를 메인 WSGI 응용 프로그램 (이미 호출되기 전에 처리되고있는 경우)에 보내지 않아도되는만큼 WSGIPassAuthorization을 사용할 필요가 없으므로 WSGIPassAuthorization이 필요하지 않습니다. –

답변

1

wsgi 버전 차이로 판명되었습니다.

+0

당신은 정교 할 수 있습니까? mod_wsgi 1.X를 여전히 사용하고 있고 mod_wsgi 2.0 이상에서만 WSGIAuthUserScript를 지원했기 때문에 그렇습니까? 그럼에도 불구하고 파싱 순서에 따라 'wsgi'에 등록 된 인증 공급자를 찾을 수 없기 때문에 AuthBasicProvider가 먼저 오류를 발생시키지 않으면 WSGIAuthUserScript가 지원되지 않는다는 점에 대해 Apache는 불평해야합니다. –