spawn-fcgi

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

cd /extra/src
wget http://www.lighttpd.net/download/spawn-fcgi-1.6.3.tar.gz
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:

#!/bin/sh
# 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
PHP_FCGI_CHILDREN=2 \
PHP_FCGI_MAX_REQUESTS=1000 \
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
wget http://qmail.jms1.net/scripts/run.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

  • 1 year 11 months ago
  • 1 year 11 months ago
  • 1 year 12 months ago
    php 8.x
  • 1 year 12 months ago
    10.6.7
  • 1 year 12 months ago
    Drop Centos 5/6 stuff