title: Nginx ldap auth login by different attributes
body: <p>I need to configure nginx to sign in by two kinds dn :</p>
  
  <pre><code>cn=appname,ou=Applications,o=example.com
  uid=username,ou=People,o=example.com
  </code></pre>
  
  <p>Here is piece of code for ldap server:</p>
  
  <pre><code>ldap_server ldapserver {
    url ldaps://ldap.example.com/o=example.com?uid,cn?sub?(..filter for search...)
  }
  </code></pre>
  
  <p>However, only username can be signed in, appname can't.
  But if I switch the position of uid and cn for that url, like</p>
  
  <pre><code>url ldaps://ldap.example.com/o=example.com?cn,uid?sub?(..filter for search...)
  </code></pre>
  
  <p>Then appname can be used to sign, username can't.</p>
  
  <p>Is this nginx-ldap-auth's bug?</p>