[완료] ubuntu 8.1 + lighttpd + trac(fastcgi) 설치방법
우분투에서 mod_python을 이용해서 apache2에 올리는 것은 성공했습니다.
그런데 mod_python이 아니라 fastcgi로 lighttpd에 trac을 올리려고 하는데 아무리 해도 되질 않네요.
설치 문서에 보면 lighttpd에서 fastcgi설정 부분이 있는데요
원래 php가 올라 가 있었기 때문에 뒤에 추가 했습니다.
fastcgi.server = (
".php" =>
((
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/tmp/php.socket",
"max-procs" => 2,
"idle-timeout" => 20,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "4",
"PHP_FCGI_MAX_REQUESTS" => "10000"
),
"bin-copy-environment" => (
"PATH", "SHELL", "USER"
),
"broken-scriptfilename" => "enable"
))<span>,
"/trac" =>
("trac" =>
("socket" => "/tmp/trac-fastcgi.sock",
"bin-path" => "/usr/share/pyshared/trac/web/fcgi_frontend.py",
"check-local" => "disable",
"bin-environment" =>
("TRAC_ENV" => "/var/lib/trac")
)
)
</span>
)그런데 trac의 bin-path부분에 설치 문서에는
"bin-path"=>"/usr/share/webapps/trac/0.9.3/hostroot/cgi-bin/trac.fcgi"
이런 식으로 되어 있었지만, 아무리 찾아도 trac.fcgi를 찾울수가 없어서
http://groups.google.com/group/trac-users/browse_thread/thread/b5d654152445f49f/3babbf0974437fe0
이 문서를 참고하였습니다.
FastCGI 문서
http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModFastCGI
Trac + lighttpd 문서
http://redmine.lighttpd.net/projects/lighttpd/wiki/HowToSetupTrac
저렇게 설정을 해 주고 lighttpd를 시작하니 아래와 같은 에러가 뜨면서 시작이 안되네요;
2009-02-21 02:50:21: (mod_fastcgi.c.1047) the fastcgi-backend /usr/share/pyshared/trac/web/fcgi_frontend.py failed to start: 2009-02-21 02:50:21: (mod_fastcgi.c.1051) child exited with status 9 /usr/share/pyshared/trac/web/fcgi_frontend.py 2009-02-21 02:50:21: (mod_fastcgi.c.1054) If you're trying to run PHP as a FastCGI backend, make sure you're using the FastCGI-enabled version. You can find out if it is the right one by executing 'php -v' and it should display '(cgi-fcgi)' in the output, NOT '(cgi)' NOR '(cli)'. For more information, check <a href="http://trac.lighttpd.net/trac/wiki/Docs%3AModFastCGI#preparing-php-as-a-fastcgi-programIf" rel="nofollow">http://trac.lighttpd.net/trac/wiki/Docs%3AModFastCGI#preparing-php-as-a-fastcgi-programIf</a> this is PHP on Gentoo, add 'fastcgi' to the USE flags. 2009-02-21 02:50:21: (mod_fastcgi.c.1358) [ERROR]: spawning fcgi failed. 2009-02-21 02:50:21: (server.c.908) Configuration of plugins failed. Going down.
에러를 보면 php에 fastcgi가 설치되지 않았다고 하는데요;
trac설정을 지우고 lighttpd를 시작하면 php가 잘 돌아갑니다.
# php5-cgi -v 하면
PHP 5.2.6-2ubuntu4.1 with Suhosin-Patch 0.9.6.2 (cgi-fcgi) (built: Feb 11 2009 20:31:57)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
이렇게 잘 나오구요;
여기에서 며칠간 해맸습니다.
도움 부탁드립니다.!


PHP에 대한 오류가
PHP에 대한 오류가 아니라, trac의 fastcgi 프론트엔드가 제대로 시작되지 않았다는 거잖아요.
아마 오류 기록을 보면 어떤 이유로 종료되었는지 나올겁니다.
lighttpd.conf
lighttpd.conf 내에서
$HTTP["url"] =~ "^/trac" { fastcgi.server = ( "/" => ( ( "bin-path" => "/usr/share/pyshared/trac/web/fcgi_frontend.py", "socket" => "/tmp/trac.sock", "check-local" => "disable", "disable-time" => 1, "min-procs" => 1, "max-procs" => 1, "bin-environment" => ( "TRAC_ENV_PARENT_DIR" => "/var/lib/trac/", ), ), ), )이렇게 설정 해 준 후에
chmod 755 /usr/share/pyshared/trac/web/fcgi_frontend.py
실행 권한을 주니 돌아가는군요.
답변 감사합니다 ^^
댓글 달기