@@ -458,74 +458,8 @@ environment and set the user-id, group-id and change to
458458another root-directory (chroot).
459459
460460For convenience a wrapper script should be used which takes
461- care of all the necessary option. Such a script in included
462- in the lighttpd distribution and is call spawn-php.sh.
463-
464- The script has a set of config variables you should take
465- a look at: ::
466-
467- ## ABSOLUTE path to the spawn-fcgi binary
468- SPAWNFCGI="/usr/local/sbin/spawn-fcgi"
469-
470- ## ABSOLUTE path to the PHP binary
471- FCGIPROGRAM="/usr/local/bin/php"
472-
473- ## bind to tcp-port on localhost
474- FCGIPORT="1026"
475-
476- ## bind to unix domain socket
477- # FCGISOCKET="/tmp/php.sock"
478-
479- ## number of PHP children to spawn
480- PHP_FCGI_CHILDREN=10
481-
482- ## number of request server by a single php-process until
483- ## is will be restarted
484- PHP_FCGI_MAX_REQUESTS=1000
485-
486- ## IP addresses where PHP should access server connections
487- ## from
488- FCGI_WEB_SERVER_ADDRS="127.0.0.1,192.168.0.1"
489-
490- # allowed environment variables sperated by spaces
491- ALLOWED_ENV="ORACLE_HOME PATH USER"
492-
493- ## if this script is run as root switch to the following user
494- USERID=wwwrun
495- GROUPID=wwwrun
496-
497- If you have set the variables to values that fit to your
498- setup you can start it by calling: ::
499-
500- $ spawn-php.sh
501- spawn-fcgi.c.136: child spawned successfully: PID: 6925
502-
503- If you get "child spawned successfully: PID:" the php
504- processes could be started successfully. You should see them
505- in your processlist: ::
506-
507- $ ps ax | grep php
508- 6925 ? S 0:00 /usr/local/bin/php
509- 6928 ? S 0:00 /usr/local/bin/php
510- ...
511-
512- The number of processes should be PHP_FCGI_CHILDREN + 1.
513- Here the process 6925 is the master of the slaves which
514- handle the work in parallel. Number of parallel workers can
515- be set by PHP_FCGI_CHILDREN. A worker dies automatically of
516- handling PHP_FCGI_MAX_REQUESTS requests as PHP might have
517- memory leaks.
518-
519- If you start the script as user root php processes will be
520- running as the user USERID and group GROUPID to drop the
521- root permissions. Otherwise the php processes will run as
522- the user you started script as.
523-
524- As the script might be started from a unknown stage or even
525- directly from the command-line it cleans the environment
526- before starting the processes. ALLOWED_ENV contains all
527- the external environment variables that should be available
528- to the php-process.
461+ care of all the necessary option. See examples at
462+ https://git.lighttpd.net/lighttpd/spawn-fcgi/src/branch/master/doc
529463
530464
531465Perl
0 commit comments