NGINX LDAP错误(初始化LDAP连接时出错:(0,'错误'))

时间:2019-06-21 11:34:08

标签: linux nginx ldap devops openldap

这是我的配置。我不断收到此错误:“初始化LDAP连接时出错:(0,'错误')“ 类似的LDAP过滤器可与其他模型完美配合: 我尝试了很多可能性,但似乎没有一个可行。我非常感谢您的帮助。 https://github.com/kvspb/nginx-auth-ldap

我使用本指南:https://github.com/nginxinc/nginx-ldap-auth

  location / {
        proxy_set_header X-Real-IP  $remote_addr;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://192.168.20.69:8080/main/;
        auth_request /auth-proxy;
               }

        location = /auth-proxy {
          internal;
        proxy_pass http://127.0.0.1:8888;
        proxy_pass_request_body off;
        #proxy_set_header Content-Length "";
        #proxy_cache auth_cache;
        #proxy_cache_valid 200 10m;
        #proxy_set_header X-CookieName "nginxauth";
        #proxy_set_header Cookie nginxauth=$cookie_nginxauth;
        proxy_set_header X-Ldap-URL "ldaps://ldap.jumpcloud.com:636/ou=Users,o=companyid,dc=jumpcloud,dc=com?uid?sub?(objectClass=posixAccount)";
        proxy_set_header X-Ldap-BaseDN "ou=Users,o=companyid,dc=jumpcloud,dc=com";
        proxy_set_header X-Ldap-BindDN "uid=user-bind,ou=Users,o=companyid,dc=jumpcloud,dc=com";
        proxy_set_header X-Ldap-BindPass "password";
        proxy_set_header X-Ldap-Realm    Restricted;

0 个答案:

没有答案