ciu...@gmail.com
unread,Dec 9, 2007, 8:19:38 AM12/9/07Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Trac Users
Hello,
I have just set up a trac site using mod_fcgid. Having multiple
projects works (I just tested) with a minimal change.
I use suexec,mod_fgid.
The steps you need to make:
1. Setup a virtual host (ssl preferably) for your domain (/var/www/
dev.domain.tld/)
2. Setup a user/group to hold your domain (only if you want suexec)
3. In the virtual host add this:
SuexecUserGroup tracuser wwwgroup # only if you want suexec
ScriptAlias /cgi-bin /var/www/dev.domain.tld/cgi-bin
<Directory /var/www/dev.domain.tld/cgi-bin>
SetHandler fcgid-script
Options ExecCGI
AllowOverride None
allow from all
SSLOptions +StdEnvVars # only if you want SSL
</Directory>
ScriptAlias / /var/www/dev.domain.tld/cgi-bin/trac.fcgi
<Location /> # only if you want SSL
SSLRequireSSL
</Location>
4. Add the file /var/www/dev.domain.tld/cgi-bin/trac.fcgi
Copy it from /usr/share/webapps/trac/0.10.4/hostroot/cgi-bin/trac.fcgi
Edit it and put just before the try:
# ... comments
import os
os.environ['TRAC_ENV_PARENT_DIR'] = "/var/lib/trac"
5. Change the owner and group of the /var/www/dev.domain.tld/cgi-bin/
trac.fcgi
to tracuser:wwwgroup (the same with SuEXEC group -- only if you want
suexec). Also be sure to chmod
it to 755, and, if you don't want the user to be able to change it,
chattr +i trac.fcgi :).
6. Do not forget to add -D SUEXEC -D FCGID at /etc/conf.d/apache2
7. Set permissions accordingly
if you use SuExec, then
chown -R tracuser:tracgroup /var/lib/trac/*
chmod -R o-rwx /var/lib/trac/*
if you don't use SuExec
chown -R apache:apache /var/lib/trac/*
chmod -R o-rwx /var/lib/trac/*
Other directories that trac uses should be writable for the
tracuser/apache (like cache for different plugins).
I think that's it :). It doesn't handle logins, if you need it, you
must either add specific locations,
<Location /project/login>
AuthType Basic
AuthName "Trac project authentication"
AuthUserFile /var/svn/project/conf/users
Require valid-user
SSLRequireSSL
</Location>
Or, if you have only one password file for all projects, you can just
add
<Location /*/login>
AuthType Basic
AuthName "Trac authentication"
AuthUserFile /var/svn/conf/users
Require valid-user
SSLRequireSSL
</Location>
Altough I'm not sure about the last one.
I hope it works,
Iulian