On 21/07/06, Matthew Palmer <[EMAIL PROTECTED]> wrote:
Hey Matt,
I've just spent a whole bloody day trying to get Trac to work with FastCGI through LighHTTPd. I got it all going in the end but there is one oddity which really bugs me. I have a host named trac.mydomain.com. I've set up Trac/FastCGI in lighttp to serve multiple projects off http://trac.mydomain.com. When I go to that URL I get the page which lists all the Trac projects. Great so far. But when I click on any project it takes me back to the project list page. If I then click on a project again it will finally take me to the project starting page. For example, http://trac.mydomain.com/test does not take me to the "test" project but back to the same page at which point the link for "test" becomes " http://trac.mydomain.com/test/test". This link then works. In fact to get to any project I can type any garbage in the URL between the host name and the project name, like so: http://trac.mydomain.com/anygarbagehere/test.
People have reported this before on various mailing lists and I tried following their solutions but none of their fixes work for me. Here's my LigHTTPd section for Trac. Notice that I had to explicitly specify the document root because my LigHTTP server serves multiple sites.
$HTTP["host"] =~ "trac.mydomain.com" {
server.document-root = "/projects/trac"
debug.log-request-handling = "enable"
debug.log-request-header = "enable"
debug.log-response-header = "enable"
debug.log-file-not-found = "enable"
alias.url = "">
"/chrome/common" => "/usr/share/trac/htdocs",
"/favicon.ico" => "/usr/share/trac/htdocs/trac.ico"
)
$HTTP["url"] =~ "^(/chrome/|/favicon.ico$)" {
# Handle these as static files
}
else $HTTP["url"] =~ "^/" {
fastcgi.server = ( "/" =>
( "trac" =>
( "socket" => "/tmp/trac- fastcgi.sock",
"check-local" => "disable",
"min-procs" => 1,
"max-procs" => 1,
"bin-path" => "/usr/share/trac/cgi-bin/trac.fcgi",
"bin-environment" => ( "TRAC_ENV_PARENT_DIR" => "/projectx/trac",
"TRAC_URI_ROOT" => "/" )
)
)
)
}
auth.require = ("/" => ("method" => "basic",
"realm" => "projects",
"require" => "valid-user"))
}
Anyway, onto the solution: I've got one of my Trac projects running under
FastCGI and it works properly (modulo a couple of irritating bugs in the
XML-RPC plugin that I've put patches in the trac-hacks trac for) with
authenticated XML-RPC. So it's backend specific, and there is a reasonable
workaround. Since I was kinda hanging out to switch to FastCGI anyway, I'm
not going to faff around too much more with why tracd is horribly broken.
Hey Matt,
I've just spent a whole bloody day trying to get Trac to work with FastCGI through LighHTTPd. I got it all going in the end but there is one oddity which really bugs me. I have a host named trac.mydomain.com. I've set up Trac/FastCGI in lighttp to serve multiple projects off http://trac.mydomain.com. When I go to that URL I get the page which lists all the Trac projects. Great so far. But when I click on any project it takes me back to the project list page. If I then click on a project again it will finally take me to the project starting page. For example, http://trac.mydomain.com/test does not take me to the "test" project but back to the same page at which point the link for "test" becomes " http://trac.mydomain.com/test/test". This link then works. In fact to get to any project I can type any garbage in the URL between the host name and the project name, like so: http://trac.mydomain.com/anygarbagehere/test.
People have reported this before on various mailing lists and I tried following their solutions but none of their fixes work for me. Here's my LigHTTPd section for Trac. Notice that I had to explicitly specify the document root because my LigHTTP server serves multiple sites.
$HTTP["host"] =~ "trac.mydomain.com" {
server.document-root = "/projects/trac"
debug.log-request-handling = "enable"
debug.log-request-header = "enable"
debug.log-response-header = "enable"
debug.log-file-not-found = "enable"
alias.url = "">
"/chrome/common" => "/usr/share/trac/htdocs",
"/favicon.ico" => "/usr/share/trac/htdocs/trac.ico"
)
$HTTP["url"] =~ "^(/chrome/|/favicon.ico$)" {
# Handle these as static files
}
else $HTTP["url"] =~ "^/" {
fastcgi.server = ( "/" =>
( "trac" =>
( "socket" => "/tmp/trac- fastcgi.sock",
"check-local" => "disable",
"min-procs" => 1,
"max-procs" => 1,
"bin-path" => "/usr/share/trac/cgi-bin/trac.fcgi",
"bin-environment" => ( "TRAC_ENV_PARENT_DIR" => "/projectx/trac",
"TRAC_URI_ROOT" => "/" )
)
)
)
}
auth.require = ("/" => ("method" => "basic",
"realm" => "projects",
"require" => "valid-user"))
}
_______________________________________________ Trac mailing list [email protected] http://lists.edgewall.com/mailman/listinfo/trac
