Skip to content

Instantly share code, notes, and snippets.

@spolu
Created November 21, 2011 08:55
Show Gist options
  • Save spolu/1382080 to your computer and use it in GitHub Desktop.
Save spolu/1382080 to your computer and use it in GitHub Desktop.
bash script for runnning fcgi
#!/bin/bash
## ABSOLUTE path to the PHP binary
PHPFCGI="/usr/bin/php5-cgi"
## tcp-port to bind on
FCGIPORT="9000"
## IP to bind on
FCGIADDR="127.0.0.1"
## number of PHP children to spawn
PHP_FCGI_CHILDREN=5
export PHP_FCGI_CHILDREN
## number of request before php-process will be restarted
PHP_FCGI_MAX_REQUESTS=1000
export PHP_FCGI_MAX_REQUESTS
/usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u www-data -g www-data -f /usr/bin/php5-cgi -P /var/run/fastcgi-php.pid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment