spawn-fcgi allows you to run FastCGI separate from Lighttpd.

cd /extra/src
tar zxf spawn-fcgi-1.6.3
cd spawn-fcgi-1.6.3

Automatic Startup
FastCGI can be supervised by daemontools.
Assuming you have already installed daemontools, create the directories to hold the lighttpd run script, logging script, and config files:

cd /var/service
mkdir -m 1755 fast-cgi
cd fast-cgi

Create the run script (/var/service/fast-cgi/run), with the following:

# You should replace xxx with the user you want php to run as (and www-data with the user lighty runs as)
exec 2>&1
exec /usr/bin/spawn-fcgi -n -s /var/run/lighttpd/php-xxx.sock -n -u xxx -U nobody -- /usr/local/bin/php-cgi

Create the logging service:

mkdir -m 755 log
cd log
mv run.log run
chmod 700 run

Create the symbolic link to start the service

ln -s /var/service/fast-cgi /service/

Recent Updates

  • 7 months 1 week ago
  • 7 months 1 week ago
  • 7 months 1 week ago
    php 8.x
  • 7 months 1 week ago
  • 7 months 1 week ago
    Drop Centos 5/6 stuff