kvspb / nginx-auth-ldap

LDAP authentication module for nginx
BSD 2-Clause "Simplified" License
735 stars 252 forks source link

header already sent while configuring auth ldap #130

Open xyalan opened 8 years ago

xyalan commented 8 years ago

I use NGINX to proxied servers with configuring nginx-auth-ldap. Auth is ok, but sometimes some static content(like js, css) read failed. I see the following alert in your nginx error log file:

[alert] 2430#0: *598 header already sent while reading response header from upstream

I view http status of request which failed read, the status is 200.And no response body.I have following ldap configure in http context:

ldap_server allusers {
        url ldap://ldap.xxx.com:389/ou=people,dc=shuyun,dc=com?uid?sub?(objectClass=*);
        binddn cn=Manager,dc=shuyun,dc=com ;
        binddn_passwd xxxx ;
        require valid_user;
}

ldap_server prj_support {
        url ldap://ldap.xxx.com:389/dc=shuyun,dc=com?uid?sub?(objectClass=*);
        binddn cn=Manager,dc=shuyun,dc=com ;
        binddn_passwd xxxx ;
        #group_attribute memberUid;
        #group_attribute_is_dn on;
        satisfy any;
        #require group "cn=dep_sysoper,ou=group,dc=shuyun,dc=com";
        require valid_user;
        #require user "cn=xx,ou=people,dc=shuyun,dc=com";
        #require user "cn=xxx,ou=people,dc=shuyun,dc=com";
}

following configure in server context:

auth_ldap "please input your username and passwd"  ;
auth_ldap_servers prj_support ;

I removed auth_ldap and auth_ldap_servers in server context, all the static context read succeed.So I have wrong configure in nginx conf?