diff --git a/web/php-fastcgi.yml b/web/php-fastcgi.yml index 521d7c2..5c31843 100644 --- a/web/php-fastcgi.yml +++ b/web/php-fastcgi.yml @@ -1,12 +1,8 @@ --- -- name: Create script for php-fastcgi - copy: src=web/php-fastcgi/php-fastcgi - dest=/usr/local/bin/php-fastcgi mode=0751 - - name: Create php-fastcgi configuration copy: src=web/php-fastcgi/php-fastcgi.conf dest=/etc/init/php-fastcgi.conf - name: Ensure that php-fastcgi service is enabled and running - service: name=php-fastcgi state=running enabled=yes + service: name=php-fastcgi state=started enabled=yes diff --git a/web/php-fastcgi/php-fastcgi b/web/php-fastcgi/php-fastcgi deleted file mode 100644 index 772417a..0000000 --- a/web/php-fastcgi/php-fastcgi +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -FASTCGI_USER=deploy -FASTCGI_GROUP=deploy -ADDRESS=127.0.0.1 -PORT=9000 -PIDFILE=/var/run/php-fastcgi.pid -CHILDREN=6 -PHP5=/usr/bin/php5-cgi - -/usr/bin/spawn-fcgi -a $ADDRESS -p $PORT -P $PIDFILE -C $CHILDREN -u $FASTCGI_USER -g $FASTCGI_GROUP -f $PHP5 diff --git a/web/php-fastcgi/php-fastcgi.conf b/web/php-fastcgi/php-fastcgi.conf index aaa887e..df19936 100644 --- a/web/php-fastcgi/php-fastcgi.conf +++ b/web/php-fastcgi/php-fastcgi.conf @@ -3,7 +3,13 @@ description "PHP Fastcgi daemon" start on (local-filesystems and net-device-up) stop on runlevel [!2345] -expect daemon respawn -exec /usr/local/bin/php-fastcgi +exec /usr/bin/spawn-fcgi \ + -n \ + -a 127.0.0.1 \ + -p 9000 \ + -C 6 \ + -u deploy \ + -g deploy \ + -f /usr/bin/php5-cgi