nginx ldap auth-身份验证超时,但ldapsearch工作正常

nginx ldap auth-身份验证超时,但ldapsearch工作正常,nginx,ldap,Nginx,Ldap,我已经安装了带有nginx auth ldap模块的nginx,我遵循了github上的指南,现在nginx错误日志向我显示如下smth: 2015/05/13 08:24:31 [error] 18696#0: *56 http_auth_ldap: Authentication timed out, client:*** 2015/05/13 08:24:31 [error] 18696#0: *57 http_auth_ldap: Authentication timed out, cli

我已经安装了带有nginx auth ldap模块的nginx,我遵循了github上的指南,现在nginx错误日志向我显示如下smth:

2015/05/13 08:24:31 [error] 18696#0: *56 http_auth_ldap: Authentication timed out, client:***
2015/05/13 08:24:31 [error] 18696#0: *57 http_auth_ldap: Authentication timed out, client:***
但是ldapsearch对请求没有问题——它可以找到用户sAMAccountName和Linuxc,ldap服务器是可访问的(来自xxx.xxx.xxx.xxx的64字节:icmp_seq=1 ttl=127 time=112 ms)。为什么我会出错?我陷入困境,没有任何想法,任何帮助都是感激的

nginx1.6.2版本。 我的nginx.conf文件:

ldap_server ad_1 {
url "ldap://xxx.xxx.xxx.xxx:389/DC=some,DC=org,DC=com?sAMAccountName?sub?(objectClass=person)";
connections 30;
binddn 'CN=Linuxc,OU=Support,OU=Company,DC=some,DC=org,DC=com';
binddn_passwd 'somepasswd';
group_attribute member;
group_attribute_is_dn on;
satisfy any;
require valid_user;
}
在conf.d文件夹中,conf文件是:

location / {
    auth_ldap "Forbidden";
    auth_ldap_servers ad_1;
    root /var/www/kibana3;
    index index.html index.htm
}

尝试在*.conf文件中添加以下指令以启用ldap模块中的缓存:

ldap_server {
    ...
}

auth_ldap_cache_enabled on;            # enable cache
auth_ldap_cache_expiration_time 10000; # 10 sec
auth_ldap_cache_size 1000;             # max 1000 records in cache

server {
    ...
}

ldapsearch使用/etc/ldap.conf或/etc/openldap/ldap.conf或其他conf文件进行设置。验证这些是否与您的nginx设置匹配。谢谢,我发现了问题-这是管理员提供的有关LDAP结构的错误信息。但您的答案是有用的——事实上,它帮助解决了ldap身份验证工作缓慢时超时的问题。