Project

General

Profile

Actions

Basic Ideas

The recommended way to run FastCGI application is supervising them with daemontools or runit. For this you need a simple ./run script in your service directory like this:

#!/bin/sh

exec 2>&1
exec /usr/bin/spawn-fcgi -n -s /var/run/lighttpd/yourphpsocketname.sock -u fastcgi-user -U webserver-user -- /usr/bin/php5-cgi

For debugging purposes you can of course start your FastCGI application from your shell like this (you need root privileges for this):

/usr/bin/spawn-fcgi -s /var/run/lighttpd/yourphpsocketname.sock -u fastcgi-user -U webserver-user -- /usr/bin/php5-cgi

Updated by stbuehler over 12 years ago ยท 3 revisions