Opened 10 years ago
Last modified 10 years ago
#11866 new enhancement
Nginx Support/Examples
Reported by: | Varriount | Owned by: | Emmanuel Blot |
---|---|---|---|
Priority: | normal | Component: | LdapPlugin |
Severity: | normal | Keywords: | nginx |
Cc: | Trac Release: | 1.0 |
Description
It would be nice if this plugin supported Nginx, (if it doesn't already, I can't get Nginx to work with this plugin) or at least had example configurations for Nginx
Attachments (0)
Change History (3)
comment:1 Changed 10 years ago by
comment:2 follow-up: 3 Changed 10 years ago by
Yes, I've compiled that, however I'm a bit clueless as to how I'm supposed to set up the nginx configuration. I'm trying to connect to an Active Directory server on the network. I have an ldap server defined in nginx.conf like so:
http { upstream local_trac { server 127.0.0.1:3050; server 127.0.0.1:3051; } ... ldap_server test_ldap { url ldap://test_ldap.com/DC=testDmn; binddn "TEST-DMN\\varriount"; binddn_passwd testPassword; group_attribute uniquemember; group_attribute_is_dn on; require valid_user; } server { listen 80; listen [::]:80; auth_ldap_servers test_ldap; location / { proxy_pass http://local_trac; } } }
And the ldap section in trac.ini is defined like this:
[ldap] enable = true basedn = DC=testDmn host = test.ldap.com bind_user = TEST-DMN\\varriount bind_passwd = testPassword user_name_attr = sAMAccountName
Despite copying the configure as best I could, I get "Unable to open LDAP cnx: Invalid credentials" whenever I try to view a page on the Trac instance while logged in to my Windows computer. (Note: trac itself is running on OpenBSD)
comment:3 Changed 10 years ago by
Replying to Varriount:
And the ldap section in trac.ini is defined like this:
[ldap] enable = true basedn = DC=testDmn host = test.ldap.com bind_user = TEST-DMN\\varriount bind_passwd = testPassword user_name_attr = sAMAccountNameDespite copying the configure as best I could, I get "Unable to open LDAP cnx: Invalid credentials" whenever I try to view a page on the Trac instance while logged in to my Windows computer. (Note: trac itself is running on OpenBSD)
It seems that bind_user
, bind_password
, basedn
and host
have a problem because the error is Invalid credentials. I guess that bind_user
option should be varriount
or cn=varriount,dc=testDmn
by LdapPlugin#PluginConfiguration.
I think that you can use an unofficial module to support authentication against LDAP servers.
LDAP Authentication module for nginx https://github.com/kvspb/nginx-auth-ldap
If you try it, would you kindly add nginx example configuration to LdapPlugin page?