# vi: ft=sh # run PHPCGI as USER=http GROUP=http # Name of daemon DAEMON="/usr/bin/spawn-fcgi" PIDFILE="/run/spawn-fcgi-php/spawn-fcgi-php.pid" # spawn the process PHPCGI="/usr/bin/php-cgi" #------------------------------------------------------------------------------- # Options for php-cgi #------------------------------------------------------------------------------- # (PHP only) Number of children to spawn PHP_FCGI_CHILDREN=4 # or export PHP_FCGI_CHILDREN # PHP FastCGI proccess exit after requests: export PHP_FCGI_MAX_REQUESTS=1000 # Choose ONE of PORT/IPADDR (for TCP) OR SOCKET (for unix domain sockets) IPADDR=127.0.0.1 PORT=9000 #SOCKET=/run/spawn-fcgi-php/spawn-fcgi.sock # Options only for socket #MODE=0644 #SOCKET_USER=other #SOCKET_GROUP=other #------------------------------------------------------------------------------- # Options for spawn-fcgi #------------------------------------------------------------------------------- # Number of children to fork, defaults to 1. SPAWN_FCGI_CHILDREN=1 #------------------------------------------------------------------------------- # For many users #------------------------------------------------------------------------------- # Run separate processes for users with UIDs from the range RANGEUID # uncomment STARTMULTI if you want this STARTMULTI=yes # Base user's socket, uncomment to use socket instead IPADDR:USERPORT #USERSOCKET='/run/spawn-fcgi-php/spawn-fcgi' # file with mapping user to port MAPUSER2PORT='/etc/nginx/map_user2port.conf' # Base user's pidfile #USERPIDFILE='/run/spawn-fcgi-php/spawn-fcgi-php' # range for UIDs, use the dash for range and split groups by spaces e.g. 1000-1003 1005 1010-1020, use parenthis for all RANGEUID=(1000) # (PHP only) Number of children to spawn USER_PHP_FCGI_CHILDREN=1 # for status, comment if you don't want print status for users #USERSSTATUS=yes OPTIONS="-u $USER -g $GROUP -f $PHPCGI -C ${PHP_FCGI_CHILDREN:-4} ${PIDFILE:+-P $PIDFILE} -F ${SPAWN_FCGI_CHILDREN:-1} " if [ -n "$SOCKET" ]; then OPTIONS+="-s $SOCKET ${MODE:+-M $MODE} ${SOCKET_USER:+-U $SOCKET_USER} ${SOCKET_GROUP:+-G $SOCKET_GROUP} " else OPTIONS+="-a $IPADDR -p $PORT " fi