未知的身份验证提供商:wsgi ...失败!
我在另一台服务器上进行了 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 均已启用。当然肯定有/有/不同,但我不知所措。
I have working wsgi authentication on another server, however a second server is not accepting the same configuration and errors upon reload with the message:
Syntax error on line 12 of /etc/apache2/sites-enabled/mydomain.com
Unknown Authn provider: wsgi
... fail
Here is the relevant portion of the config file (line 12 is 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
And the auth_test.wsgi file:
def check_password(environ, user, password):
if user == 'someusername':
if password == 'asecretpassword':
return True
return False
return None
mod-wsgi.conf and mod-wsgi.load are both enabled. Of course there must be /something/ different, but I am at a loss.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
原来是wsgi版本差异。
It turned out to be a wsgi version difference.