
Intenté habilitarlo mod_fastcgi
en mi servidor lighttpd (que se ejecuta en Ubuntu), con la siguiente configuración (directamente del ejemplo en 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"
))
)
... pero ahora lighttpd no inicia con lo siguiente en los registros:
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.
¿Cómo puedo saber qué está mal y solucionarlo?
Respuesta1
Veré si puedo ayudar, pero tenga en cuenta que no tengo una configuración liviana, por lo que no puedo comparar 1 por 1.
Supongo que deberías ver cómo está configurado tu php-cgi y qué admitirá. Entonces... tal vez comience con algo como...
$ which php-cgi
/usr/bin/php-cgi
$ /usr/bin/php-cgi -m
[PHP Modules]
bcmath
bz2
calendar
cgi-fcgi
...
Entonces tal vez:
$ /usr/bin/php-cgi -i > phpcgi.html
Luego, abra phpcgi.html en un navegador. Sospecho que phpcgi.html y phpcgi -m deberían tener líneas que mencionen "cgi-fcgi" oAPI de servidor CGI/FastCGI, etc.
Si ambos se ven bien (es decir, parece que están configurados para admitir CGI), entonces comenzaría a seleccionar la configuración ligera y los archivos /etc/php5/cgi/*.ini.
Actualmente estoy ejecutando una configuración de Nginx/spawn-fcgi/PHP5 que funciona bastante bien.
¿Qué Ubuntu está ejecutando (cat /etc/issue), qué arquitectura (uname -a) y qué paquetes lighttpd/php/fastcgi (dpkg --list | egrep "lighttpd|fastcgi|php")?