I've tested trac with plugin git. I've used mod_python and mod_wsgi.
Result : The plugin git crash sometimes with Popen function into pyGIT line 50
Same result with mod_python or mod_wsgi, but the standelone trac server works.
I've don't find the solution seems a problem with apache. If you want tested trac/git/apache :
1.Installation
# pacman-g2 -S trac git mod_wsgi
$ mkdir src
$ cd ~/src
$ svn checkout http://trac-hacks.org/svn/gitplugin
$ cd gitplugin/0.11
Install it.
# python setup.py install
2. Configuration
I will use /home/gaetan/frugalware-usblive as trac home and /home/gaetan/frugalware-usblive/fwusb/ as git repo.
2.1 Create your trac repo :
$ trac-admin /home/gaetan/frugalware-usblive initenv
2.2 Create your git repo:
$ cd /home/gaetan/frugalware-usblive/fwusb/
$ git init
2.3 Configure the plugin git for trac :
Edit trac.ini
[trac]
repository_dir = /home/gaetan/frugalware-usblive/fwusb/.git
repository_type = git
[git]
cached_repository = false
persistent_cache = false
shortrev_len = 6
2.4 Apache configuration :
Edit : /etc/httpd/site.d/trac.wsgi and add :
import sys
sys.stdout = sys.stderr
import os
os.environ['TRAC_ENV'] = '/home/gaetan/frugalware-usblive/'
os.environ['PYTHON_EGG_CACHE'] = '/home/gaetan/frugalware-usblive/eggs'
import trac.web.main
application = trac.web.main.dispatch_request
Add your project :
WSGIScriptAlias /trac /etc/httpd/site.d/trac.wsgi
<Directory /home/gaetan/frugalware-usblive/>
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>
2.5 Fix the permission :
find /home/gaetan/frugalware-usblive -type f -exec chmod 660 {} \;
find /home/gaetan/frugalware-usblive/fwusb -type d -exec chmod 2770 {} \;
3. Acces configuration
Before you should configure apache access :
Added the user bouleetbil as admin :
#htpasswd -c /home/gaetan/frugalware-usblive/.htpasswd bouleetbil
WSGIScriptAlias /trac /etc/httpd/site.d/trac.wsgi
<Directory /home/gaetan/frugalware-usblive/>
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>
$ trac-admin /home/gaetan/frugalware-usblive/ permission add bouleetbil TRAC_ADMIN
Then, the user bouleetbil will be able to see the Admin tab, and can then access the permissions menu. This menu will allow you to perform all the following actions, but from the browser without requiring root access to the server (just the correct permissions for your user account).
see http://trac.edgewall.org/wiki/TracPermissions for the details
4. Restart apache2
# service httpd restart
see your project : http://localhost/trac
You can test trac without apache, after install trac and configure it :
$ tracd --port 8080 /home/gaetan/frugalware-usblive/
see the the result : http://localhost:8080/frugalware-usblive
For use some differents trac with mod_wsgy http://code.google.com/p/modwsgi/wiki/IntegrationWithTrac
Now I will tested http://www.redmine.org/projects/redmine