Skip to content

Commit

Permalink
* Made the FCGI process variables configurable in the
Browse files Browse the repository at this point in the history
  /etc/default/php-cgi file.
  • Loading branch information
António P. P. Almeida committed Sep 6, 2010
1 parent b69b4de commit 3320c56
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.org
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,14 @@

6. You can tune the =FastCGI= parameters =PHP_FCGI_CHILDREN= and
=PHP_FCGI_MAX_REQUESTS= to whatever values work best for you.
They're defined in the =/etc/default/php-cgi= file.

** PHP FPM

If you're using the [[http://php-fpm.org][PHP FPM]] (FastCGI Process Manager) the script
can be used almost verbatim. Just change the value of =DAEMON= to
=php-fpm= and you're done.
=php-fpm= and you're done. Note that a lot of niceties like
reloading of the configuration are missing.

** Security & Trust

Expand Down
4 changes: 4 additions & 0 deletions default/php-cgi
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
## Whether the php cgi daemon should receive incoming requests using
## Unix sockets or Internet Sockets. The default is Unix sockets.
USE_UNIX=1

## The PHP fcgi control parameters.
PHP_FCGI_CHILDREN=4
PHP_FCGI_MAX_REQUESTS=1000
4 changes: 2 additions & 2 deletions php-cgi
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ USER=www-data
GROUP=www-data

## FastCGI specific parameters.
PHP_FCGI_CHILDREN=15
PHP_FCGI_MAX_REQUESTS=1000
PHP_FCGI_CHILDREN=${PHP_FCGI_CHILDREN-6}
PHP_FCGI_MAX_REQUESTS=${PHP_FCGI_MAX_REQUESTS-1000}

## The arguments to pass to the php cgi program.
DAEMON_OPTIONS="- USER=$USER GROUP=$GROUP PATH=/usr/bin PHP_FCGI_CHILDREN=$PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=$PHP_FCGI_MAX_REQUESTS"
Expand Down

0 comments on commit 3320c56

Please sign in to comment.