Sign inSign up

djx339/nginx-ldap

By djx339

•Updated about 11 years ago

Dockerized nginx with LDAP authentication module

Image
1

7.6K

djx339/nginx-ldap repository overview

⁠docker-nginx-ldap

Dockerized nginx with LDAP authentication module

Version: 1.9.3

⁠LDAP authentication configuration example

Define list of your LDAP servers with required user/group requirements:

http {
  ldap_server test1 {
    url ldap://192.168.0.1:3268/DC=test,DC=local?sAMAccountName?sub?(objectClass=person);
    binddn "TEST\\LDAPUSER";
    binddn_passwd LDAPPASSWORD;
    group_attribute uniquemember;
    group_attribute_is_dn on;
    require valid_user;
  }

  ldap_server test2 {
    url ldap://192.168.0.2:3268/DC=test,DC=local?sAMAccountName?sub?(objectClass=person);
    binddn "TEST\\LDAPUSER";
    binddn_passwd LDAPPASSWORD;
    group_attribute uniquemember;
    group_attribute_is_dn on;
    require valid_user;
  }
}

And add required servers in correct order into your location/server directive:

server {
    listen       8000;
    server_name  localhost;

    auth_ldap "Forbidden";
    auth_ldap_servers test1;
    auth_ldap_servers test2;

    location / {
        root   html;
        index  index.html index.htm;
    }

}

Tag summary

Content type

Image

Digest

sha256:a13d95573…

Size

125 MB

Last updated

about 11 years ago

docker pull djx339/nginx-ldap