lunes, 11 de mayo de 2009

Añadir proyecto en Trac con lighttpd

Console commands:

for p in env svn auth; do mkdir -p /srv/trac/$p/demo; done

trac-admin /srv/trac/env/demo initenv

htdigest -c /srv/trac/auth/demo/users "trac demo realm" admin

trac-admin /srv/trac/env/demo permission add admin TRAC_ADMIN

Next, we need a configuration file. It delegates the trac path to a FastCGI handler and contains the location of the authentication data. Copy the configuration file to /etc/lighttpd/conf-available/ and enable the configuration:

lighty-enable-mod auth trac-demo
/etc/init.d/lighttpd force-reload

Configuration file:


1 server.modules += ( "mod_fastcgi" )
2
3 fastcgi.server += ("/trac" =>
4 ((
5 "socket" => "/tmp/trac-fastcgi.sock",
6 "bin-path" => "/usr/share/pyshared/trac/web/fcgi_frontend.py",
7 "check-local" => "disable",
8 "max-procs" => 3,
9 "bin-environment" => ("TRAC_ENV" => "/srv/trac/env/demo")
10 ))
11 )
12
13 $HTTP["url"] =~ "^/trac/login$" {
14 auth.backend = "htdigest",
15 auth.backend.htdigest.userfile = "/srv/trac/auth/demo/users",
16 auth.require = ("" => (
17 "method" => "digest",
18 "realm" => "trac demo realm",
19 "require" => "valid-user"
20 ))
21 }

No hay comentarios:

Publicar un comentario