summaryrefslogtreecommitdiff
path: root/~fauno/spawn-fcgi-php/spawn-fcgi-php.conf
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2012-11-18 17:13:56 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2012-11-18 17:13:56 -0300
commite5e6eaf7e3cad31a74862656283728197b715178 (patch)
tree2b6c997f1bf5d936019a1dfc741b192208270e1b /~fauno/spawn-fcgi-php/spawn-fcgi-php.conf
parent7eff80609dcc365658c94f899d4a3a298e8fb5dd (diff)
parentdcb01f130dac1b244e0ed9fe0041d92a130ab427 (diff)
downloadabslibre-e5e6eaf7e3cad31a74862656283728197b715178.tar.gz
abslibre-e5e6eaf7e3cad31a74862656283728197b715178.tar.bz2
abslibre-e5e6eaf7e3cad31a74862656283728197b715178.zip
Merge branch 'master' of ssh://gparabola/srv/git/abslibre
Diffstat (limited to '~fauno/spawn-fcgi-php/spawn-fcgi-php.conf')
-rw-r--r--~fauno/spawn-fcgi-php/spawn-fcgi-php.conf60
1 files changed, 60 insertions, 0 deletions
diff --git a/~fauno/spawn-fcgi-php/spawn-fcgi-php.conf b/~fauno/spawn-fcgi-php/spawn-fcgi-php.conf
new file mode 100644
index 000000000..d87520c1d
--- /dev/null
+++ b/~fauno/spawn-fcgi-php/spawn-fcgi-php.conf
@@ -0,0 +1,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