Skip to content

Instantly share code, notes, and snippets.

@lancechentw
Created August 3, 2012 18:39
Show Gist options
  • Save lancechentw/3250315 to your computer and use it in GitHub Desktop.
Save lancechentw/3250315 to your computer and use it in GitHub Desktop.
apache config for git smart http with ldap auth
<VirtualHost *:80>
ServerName your.domain.name
DocumentRoot /srv/http
setEnv GIT_PROJECT_ROOT /opt/git
setEnv GIT_HTTP_EXPORT_ALL
scriptAlias /git/ /usr/lib/git-core/git-http-backend/
<Directory />
Order allow,deny
Allow from all
</Directory>
<LocationMatch "/git/">
AuthName "GIT"
AuthType Basic
AuthBasicProvider ldap
AuthzLDAPAuthoritative off
AuthLDAPURL "ldaps://your.ldap.server/ou=People,dc=cs,dc=nctu,dc=edu,dc=tw"
Require valid-user
</LocationMatch>
</VirtualHost>
LDAPVerifyServerCert off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment