I am using php-cgi on ubuntu(with nginx), and the command to start it is:
spawn-fcgi -a 127.0.0.1 -p 9100 -f /usr/bin/php-cgi -P /var/run/fastcgi-php.pid
but sometimes the php-cgi process will exit automatically, and I need to start it manually. Is there any way that can make it restart automatically, eg) write init script?
Please suggest, thanks.