<VirtualHost *:80>
DocumentRoot /opt/trac/myprj
<Location />
SetHandler mod_python
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /opt/trac/myprj
PythonOption TracUriRoot /
AuthType Basic
AuthName "Trac"
AuthBasicProvider "ldap"
authzldapauthoritative Off
AuthLDAPBindDN "user@example.com"
AuthLDAPBindPassword"passwd"
AuthLDAPURL"ldap://ldap.example.com:389/DC=example,DC=com?sAMAccountName?sub?(objectClass=*)"
Require valid-user
Require group "cn=group1, ou=groups, dc=example, dc=com"
</Location>
</VirtualHost>
红色部分根据具体情况配置
重启Apache
/usr/local/apace/bin/apachectl restart
大功告成