nginx-ldap-auth - 身份驗證超時,但ldapsearch工作正常

[英]nginx-ldap-auth - authentication timed out, but ldapsearch works fine


I have installed nginx with nginx-auth-ldap module, I followed guide on github and now nginx error log show me smth like that:

我已經用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:***

But ldapsearch is OK with requests - it finds users sAMAccountName and Linuxc, ldap server is reachable (64 bytes from xxx.xxx.xxx.xxx: icmp_seq=1 ttl=127 time=112 ms). Why am I getting errors? I am stuck and have no ideas, ANY help is appreciated.

但ldapsearch對請求沒問題 - 它找到用戶sAMAccountName和Linuxc,ldap服務器是可以訪問的(64字節來自xxx.xxx.xxx.xxx:icmp_seq = 1 ttl = 127 time = 112 ms)。為什么我會收到錯誤?我被困住了,沒有任何想法,感謝任何幫助。

nginx 1.6.2 version. my nginx.conf file:

nginx 1.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;
}

And in conf.d folder conf file is:

在conf.d文件夾中conf文件是:

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

1 个解决方案

#1


Try add this directives in your *.conf file to enable cache in ldap module:

嘗試在* .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 {
    ...
}

注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2015/05/13/72fc95299abb7637f64ed454778e63f2.html



 
粤ICP备14056181号  © 2014-2021 ITdaan.com