无效的命令'AuthzLDAPAuthoritative'

规格:Apache 2.24 O / S:Suse / RedHat / Windows

Windows:Apache httpd Linux:Apache DS(LDAP)

实现Apache Httpd + LDAP + SSO任务(mod_session.so)

如下所述得到错误

"Invalid command 'AuthzLDAPAuthoritative', perhaps misspelled or defined by a module not included in the server configuration" 

该设置工作在Apache Httpd 2.22 + LDAP – SSO,因此根据文档,mod_session是假设与Apache 2.24 ……. 🙁

有些身体有任何解决办法

关于karthik

你应该阅读这个: http : //httpd.apache.org/docs/2.4/upgrading.html#run-time

该指令在2.4之后被删除;

看起来你还没有加载authnz_ldap_module

 LoadModule authnz_ldap_module modules/mod_authnz_ldap.so 

不知道是否是相同的问题,因为我切换到2.4而不是2.2.24。 一切工作正常与httpd 2.2.22和停止与2.4.4工作。

我在我的httpd.conf中加载了必要的模块:

 LoadModule authnz_ldap_module modules/mod_authnz_ldap.so LoadModule ldap_module modules/mod_ldap.so 

我的Ldap Conf如下所示:

 <Location /> AuthType Basic AuthName "LDAP Authentication" AuthBasicProvider ldap file AuthzLDAPAuthoritative off AuthLDAPURL "URL" AuthLDAPBindDN "BindDN" AuthLDAPBindPassword "BindPassword" Require valid-user Order allow,deny Allow from all </Location> 

错误消息说:

 /opt/httpd/dev/bin/apachectl -f /opt/httpd/UAT/conf/httpd.conf -k start AH00526: Syntax error on line 60 of /opt/httpd/UAT/conf/vhosts/_hobbit.conf: Invalid command 'AuthzLDAPAuthoritative', perhaps misspelled or defined by a module not included in the server configuration make: *** [start] Error 1 

我在邮件列表中发现了同样的错误: 链接到邮件列表
看起来他find了一个解决scheme: 链接到解决scheme

我已经编译,他说,使用我自己的apr / apr-util和所有ldap标志(–with-ldap,–enable-ldap,…),但我仍然无法得到它的工作。

也许有人可以弄清楚什么?

编辑/解决scheme :好吧..从我的虚拟主机configuration删除“AuthzLDAPAuthoritative关”工作。 看起来这个设置已经被删除了2.4。

设置存在于2.2 mod_authnz_ldap文档中,并且不存在于2.4 mod_authnz_ldap文档中。 (由于缺乏声誉,不能发布链接)

不知道如果你只是从你的configuration删除它,但我认为它应该事后。

AuthLDAPBindAuthoritativeclosures

代替

AuthzLDAPAuthoritative off(放下'z')

这帮助我在使用apache 2.4时2.2的文档说使用AuthzLDAPAuthoritative,但是2.4的文档说使用AuthLDAPBindAuthoritative。 再加上networking上的大多数例子仍然使用它与'Z'。 我不确定哪个版本改变了。

希望这可以帮助。

 # sudo apt-get install libapache2-mod-authnz-external .. # a2enmod .. Which module(s) do you want to enable (wildcards ok)? *authnz* Enabling module authnz_external. Considering dependency ldap for authnz_ldap: Enabling module ldap. Enabling module authnz_ldap. To activate the new configuration, you need to run: service apache2 restart ..