1 # Apache Gitolite smart-http install Active Directory Authentication
3 # Author: Jonathan Gray
5 # It is assumed you already have mod_ssl, mod_ldap, & mod_authnz configured for apache
6 # It is also assumed you are disabling http on port 80 and requiring the use of https on port 443
8 # Boiler plate configuration from the smart-http deployment documentation script
9 # Adjust paths if you use something other than the default
10 SetEnv GIT_PROJECT_ROOT /var/www/gitolite-home/repositories
11 ScriptAlias /git/ /var/www/gitolite-home/gitolite-source/src/gitolite-shell/
12 ScriptAlias /gitmob/ /var/www/gitolite-home/gitolite-source/src/gitolite-shell/
13 SetEnv GITOLITE_HTTP_HOME /var/www/gitolite-home
14 SetEnv GIT_HTTP_EXPORT_ALL
16 # Setup LDAP trusted root certificate from your domain
17 LDAPTrustedGlobalCert CA_BASE64 /etc/httpd/conf.d/domain.ca.cer
19 # In case you havn't setup proper SSL certificates in ssl.conf, go ahead and do it here to save headache later with git
20 SSLCertificateFile /etc/httpd/conf.d/gitolite.server.crt
21 SSLCertificateKeyFile /etc/httpd/conf.d/gitolite.server.key
22 SSLCertificateChainFile /etc/httpd/conf.d/DigiCertCA.crt
26 # In case you want to restrict access to a given ip/subnet
27 #Allow from my.ip.range/cidr
31 AuthBasicProvider ldap
32 AuthUserFile /dev/null
33 AuthzLDAPAuthoritative on
34 AuthLDAPURL ldaps://AD.DC1.local:3269 AD.DC2.local:3269 AD.DC3.local:3269/?sAMAccountName?sub
35 AuthLDAPBindDN git@domain.local
36 AuthLDAPBindPassword super.secret.password
37 AuthLDAPGroupAttributeIsDN on
39 # You must use one of the two following approaches to handle authentication via active directory
41 # Require membership in the gitolite users group in AD
42 # The ldap-filter option is used to handle nested groups on the AD server rather than multiple calls to traverse from apache
43 # Require ldap-filter memberof:1.2.840.113556.1.4.1941:=cn=Gitolite Users,ou=Security Groups,dc=domain,dc=local
45 # Alternatively, require a valid user account only since you're going to control authorization in gitolite anyway