
다음 구성을 사용하여 lighttpd 서버(Ubuntu에서 실행)에서 활성화를 시도했습니다 mod_fastcgi
( 의 예에서 직접 conf-available
):
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"
))
)
... 하지만 이제 로그에서 다음과 같이 lighttpd가 시작되지 않습니다.
2010-09-06 17:13:39: (log.c.166) server started
2010-09-06 17:13:39: (mod_fastcgi.c.1104) the fastcgi-backend /usr/bin/php-cgi failed to start:
2010-09-06 17:13:39: (mod_fastcgi.c.1108) child exited with status 2 /usr/bin/php-cgi
2010-09-06 17:13:39: (mod_fastcgi.c.1111) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version. If this is PHP on Gentoo, add 'fastcgi' to the USE flags.
2010-09-06 17:13:39: (mod_fastcgi.c.1399) [ERROR]: spawning fcgi failed.
2010-09-06 17:13:39: (server.c.931) Configuration of plugins failed. Going down.
무엇이 잘못되었는지 어떻게 알 수 있고 수정할 수 있나요?
답변1
제가 도와드릴 수 있는지 알아보겠습니다. 하지만 저는 가벼운 설정이 아니기 때문에 1:1을 비교할 수 없다는 점을 명심하세요.
php-cgi가 어떻게 구성되어 있고 무엇을 지원하는지 살펴봐야 할 것 같습니다. 그럼... 아마도 다음과 같은 것부터 시작해 보세요...
$ which php-cgi
/usr/bin/php-cgi
$ /usr/bin/php-cgi -m
[PHP Modules]
bcmath
bz2
calendar
cgi-fcgi
...
그러면 아마:
$ /usr/bin/php-cgi -i > phpcgi.html
그런 다음 브라우저에서 phpcgi.html을 엽니다. 나는 phpcgi.html과 phpcgi -m 둘 다에 "cgi-fcgi" 또는서버 API CGI/FastCGI, 등.
둘 다 좋아 보인다면(즉, CGI를 지원하도록 설정된 것 같다면) 간단한 설정과 /etc/php5/cgi/*.ini 파일을 선택하기 시작할 것입니다.
저는 현재 꽤 잘 작동하는 Nginx/spawn-fcgi/PHP5 설정을 실행하고 있습니다.
어떤 Ubuntu를 실행 중입니까(cat /etc/issue), 어떤 아키텍처(uname -a), 어떤 lighttpd/php/fastcgi 패키지(dpkg --list | egrep "lighttpd|fastcgi|php")입니까?