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

  • 5 days 1 hour ago
    1.27.2 update
  • 2 weeks 2 days ago
    Drupal 10/11 config
  • 2 weeks 3 days ago
  • PHP
    2 weeks 3 days ago
    PHP 8.3.11 and AlmaLinux
  • 2 weeks 4 days ago
    New version of Pound