HowToSetupTrac » History » Revision 6
« Previous |
Revision 6/18
(diff)
| Next »
Milde, 2006-06-15 19:01
spam removal
= How to setup trac with Lighttpd =
[http://www.edgewall.com/trac/ Trac] is an enhanced wiki and issue tracking system for software development projects.
lighttpd.net is using it as its bug-tracking system and web-frontend for [http://subversion.tigris.org/ subversion].
Common setup using FastCGI {{{$HTTP["host"] == "trac.example.com" {
server.document-root = "/www/htdocs/sites/trac.example.com"
alias.url = (
"/trac_prefix/chrome/common/" => "/usr/share/trac/htdocs/",
"/favicon.ico" => "/usr/share/trac/htdocs/trac.ico",
"/trac_prefix" => "/usr/share/webapps/trac/0.9.3/hostroot/cgi-bin/trac.cgi",
) # rewrite for multiple svn project
url.rewrite-final = (
"^/trac_prefix/[^/]+/chrome/common/(.*)" => "/chrome/common/$1",
) $HTTP["url"] =~ "^(/trac_prefix/chrome/|/favicon.ico$)" { # no fastcgi
} # end of $HTTP["url"] =~ "^(/trac_prefix/chrome/|favicon.ico$)"
else $HTTP["url"] =~ "^/trac_prefix/" {
fastcgi.server = (
"/" => (
"trac.cgi" => (
"bin-path" => "/usr/share/webapps/trac/0.9.3/hostroot/cgi-bin/trac.fcgi",
"socket" => "/tmp/trac.sock",
"check-local" => "enable",
"disable-time" => 1,
"min-procs" => 1,
"max-procs" => 1,
"bin-environment" => (
"TRAC_ENV_PARENT_DIR" => "/var/lib/trac/",
),
),
),
)
} # end of $HTTP["url"] =~ "^/trac_prefix/"
} # end of $HTTP["host"] "trac.example.com"
}}}
Change "/trac_prefix" (neither "/trac_prefix/" nor "trac_prefix/", nor "trac_prefix") to anything else or even remove it if you want.
Common setup using CGI
Take a look at the [wiki:TracInstall updated Trac setup documentation]
Separated setupThe webserver at lighttpd.net is living in a chroot which separates the webserver-root from the rest of the system and the subversion repositories.
As trac requires physical access it couldn't be installed in the [wiki:TracInstall well documented way].
trac provides a seperated tracd which is started locally at port 9090:
{{{
#!ShellExample
$ tracd -b 127.0.0.1 -p 9090 /path/to/trac/lighttpd/
}}}
To forward all requests from the webserver to trac the [http://www.lighttpd.net/documentation/proxy.html proxy module] is used:
{{{
$HTTP["host"] "trac.lighttpd.net" {
# forward all requests at trac.lighttpd.net to the tracd
proxy.server = ("" => ( "trac" => ( "host" => "127.0.0.1", "port" => 9090 )))
}
}}}
Updated by Milde over 18 years ago · 6 revisions