Can't bind spawn-fcgi to address
Posted
by Xeoncross
on Server Fault
See other posts from Server Fault
or by Xeoncross
Published on 2010-05-23T21:46:28Z
Indexed on
2010/05/23
21:51 UTC
Read the original article
Hit count: 553
Following some nice instructions I am almost through setting up PHP to run on nginx. However, every time I try to start spawn-fcgi I get an error message
demo@desktop:/usr/bin$ sudo /etc/init.d/php-fastcgi start
spawn-fcgi: bind failed: Cannot assign requested address
My /etc/init.d/php-fastcgi startup script is:
#!/bin/bash
PHP_SCRIPT=/usr/bin/php-fastcgi
FASTCGI_USER=demo
RETVAL=0
case "$1" in
start)
su - $FASTCGI_USER -c $PHP_SCRIPT
RETVAL=$?
;;
stop)
killall -9 php5-cgi
RETVAL=$?
;;
restart)
killall -9 php5-cgi
su - $FASTCGI_USER -c $PHP_SCRIPT
RETVAL=$?
;;
*)
echo "Usage: php-fastcgi {start|stop|restart}"
exit 1
;;
esac
exit $RETVAL
console output
which loads /usr/bin/php-fastcgi
#!/bin/sh
/usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -C 6 -u demo -f /usr/bin/php5-cgi
One thing to note is that I am running the PHP cgi as the user "demo" which is my account.
© Server Fault or respective owner