summaryrefslogtreecommitdiff
path: root/~fauno/spawn-fcgi-php/spawn-fcgi-php.conf
blob: d87520c1d939aa94890fb6ec29872302ab09dd22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# vi: ft=sh
# run PHPCGI as
USER=http
GROUP=http

# Name of daemon
DAEMON="/usr/bin/spawn-fcgi"
PIDFILE="/var/run/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=/var/run/spawn-fcgi/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='/var/run/spawn-fcgi/spawn-fcgi'
# file with mapping user to port
MAPUSER2PORT='/etc/nginx/conf/map_user2port.conf'
# Base user's pidfile
#USERPIDFILE='/var/run/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-1001)
# (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