BUG's Living Diary

Icon

蟲的生活日誌

trac using apache2 + mod_python + ldap at FreeBSD 7

FreeBSD 的 Ports collection 很貼心把 trac 都準備好了
你會需要的 ports 有:

www/apache22
www/trac
www/mod_python3

我把 trac 的 projects parent dir 放在 /usr/home/trac
你可以用 trac-admin 在這個目錄下開 project
你可以參考 TracAdmin

然後加上一點設定在 /usr/local/etc/apache22/httpd.conf:

LoadModule python_module libexec/apache22/mod_python.so

以及新增一個檔案 /usr/local/etc/apache22/Includes/trac.conf 如下:

SetHandler mod_python
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /usr/home/trac
PythonOption TracUriRoot /trac

如果要登入驗證一樣用 apache ldap 的方式在 trac.conf 的檔案中加上:

AuthType Basic
AuthName “Trac”
AuthBasicProvider “ldap”
AuthLDAPURL “ldap://adserver.company.com:3268/DC=company,DC=com?sAMAccountName?sub?(objectClass=user)”
AuthLDAPBindDN ldap-auth-user@company.com
AuthLDAPBindPassword “the_password”
require valid-user

其實這些這裡都有教:
TracModPython

Filed under: 蟲的研究心得

Leave a Reply

Author

參觀人數

  • 19,615 人次

Flickr 相簿

DSCN1635

More Photos