Created
September 21, 2015 05:05
-
-
Save shantanubhadoria/b135a961d31e0b760923 to your computer and use it in GitHub Desktop.
Setting up PHP fast-cgi using upstart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/etc/default/php-fastcgi | |
PHP5=/usr/bin/php5-cgi | |
FASTCGI_USER=www-data | |
FASTCGI_GROUP=www-data | |
ADDRESS=127.0.0.1 | |
PORT=9000 | |
CHILDREN=6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/etc/init/php-fastcgi.conf | |
# | |
# php-fastcgi - PHP FastCGI | |
description "PHP FastCGI" | |
start on filesystem or runlevel [2345] | |
stop on runlevel [!2345] | |
pre-start script | |
test -x /usr/bin/php-cgi || { stop; exit 0; } | |
test -f /etc/default/php-fastcgi || { stop; exit 0; } | |
end script | |
respawn | |
script | |
. /etc/default/php-fastcgi | |
exec /usr/bin/spawn-fcgi \ | |
-n \ | |
-a $ADDRESS \ | |
-p $PORT \ | |
-C $CHILDREN \ | |
-u $FASTCGI_USER \ | |
-g $FASTCGI_GROUP \ | |
-f $PHP5 | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Copied from https://gist.github.com/osantana/996287
Fixed minor errors in the files