Skip to content

Instantly share code, notes, and snippets.

@mrluanma
Created August 19, 2011 12:51
Show Gist options
  • Save mrluanma/1156726 to your computer and use it in GitHub Desktop.
Save mrluanma/1156726 to your computer and use it in GitHub Desktop.
cgit authenticate with HTTP Basic and LDAP.
Alias /cgit-data /usr/share/cgit
ScriptAlias /cgit /var/www/cgi-bin/cgit
<Directory /var/www/cgi-bin/>
order deny,allow
allow from all
AuthName "Authorization Required"
AuthType Basic
AuthBasicProvider ldap
AuthzLDAPAuthoritative Off
AuthLDAPUrl ldap://127.0.0.1:389/ou=Users,domainName=example.com,o=domains,dc=mail,dc=example,dc=com?mail?sub?(&(enabledservice=cgit)(accountStatus=active))
AuthLDAPBindDN "cn=vmail,dc=mail,dc=example,dc=com"
AuthLDAPBindPassword "90452388210931115272168025648"
Require valid-user
</Directory>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment