Help to set up trac properly

100 views
Skip to first unread message

Jan Michael

unread,
Nov 16, 2007, 10:00:56 AM11/16/07
to Trac Users
Hi Trac Folks,

yes, I admit. This is another post where somebody ask for proper setup
of trac.
I tried for the last 5 hours to get it work and now the last chance I
see is to ask you for help.

1. Environment:
- Gentoo Linux
- Apache 2.2.6 with mod_python and mod_fcgid
- Trac 0.10.4 with VHOSTS
- Python 2.4.4
- SVN in /var/svn/repos
- TRAC in /var/lib/trac
- HTTP in /var/www/dev.domain.tld/

2. Desired Setup
- multiple projects on one vhost
- vhost should be dev.domain.tld
- trac should be used with apache installation (trac already works
with built-in webserver)

If someone accesses dev.domain.tld one should get the list of all
available from /var/lib/trac/. After clicking on one of the project
one should guided to the appropriate project page.

Can someone provide a working vhost configuration for apache with
mod_fcgid? I tried already the tutorials on the trac website and from
the gentoo wiki. None of them worked for me.

Many Thanks,

Jan



Manuzhai

unread,
Nov 17, 2007, 7:58:43 AM11/17/07
to trac-...@googlegroups.com
Do you need it to be mod_fcgid? I have a similar setup actually, also
on Gentoo, but I use mod_wsgi (and Trac 0.11dev, but that doesn't make
much of a difference for the Apache config).

Cheers,

Manuzhai

ciu...@gmail.com

unread,
Dec 9, 2007, 8:19:38 AM12/9/07
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

RjOllos

unread,
Jan 16, 2013, 2:24:09 AM1/16/13
to trac-...@googlegroups.com


On Friday, November 16, 2007 7:00:56 AM UTC-8, Jan Michael wrote:
[...]

1. Environment:
- Gentoo Linux
- Apache 2.2.6 with mod_python and mod_fcgid
- Trac 0.10.4 with VHOSTS
- Python 2.4.4

Even if you are constrained to Python 2.4.x, you can still run Trac 0.12.4 (with 0.12.5 to be released soon). Trac 0.10.4 is far obsolete by now, and you'll hardly find any plugins that support it, and few people using it anymore (hopefully).
 
Reply all
Reply to author
Forward
0 new messages