我已經在另一個服務器上的工作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
MOD-wsgi.conf和MOD-WSGI .load都啓用。當然,必須有/東西/不同,但我很茫然。
如果使用WSGIAuthUserScript,則不需要WSGIPassAuthorization,因爲您不需要將登錄憑證發送到主WSGI應用程序(如果存在),因爲它已在調用之前處理。 – 2010-01-14 23:56:53