up vote 2 down vote favorite
share [g+] share [fb]

I have installed FastCGI using yum, and edited my lighttpd.conf, but when restarting the server I receive this error.

2009-06-24 12:44:43: (log.c.97) server started 
2009-06-24 12:44:43: (mod_fastcgi.c.924) bind failed for: unix:/var/run/lighttpd/php-fastcgi.socket-0 No such file or directory 
2009-06-24 12:44:43: (mod_fastcgi.c.1365) [ERROR]: spawning fcgi failed. 
2009-06-24 12:44:43: (server.c.902) Configuration of plugins failed. Going down.

The concerned part of my lighttpd.conf is:

fastcgi.server             = ( ".php" =>
                               ( "localhost" =>
                                 (
                                  #"socket" => "/var/run/lighttpd/php-fastcgi.socket",
                                  #"bin-path" => "/usr/bin/php-cgi"
                                   "socket" => "/tmp/php-fastcgi.socket",
                                   "bin-path" => "/usr/bin/php-cgi"
                                 )
                               )
                            )

Thanks ever so much.

link|improve this question

46% accept rate
feedback

4 Answers

up vote 0 down vote accepted

Check that lighttpd has permission to write to /var/run/lighttpd

link|improve this answer
feedback
touch /tmp/php-fastcgi.socket

Just create the file with the above command.

EDIT: Either your using old log output or your conf is newer. Either way create /var/run/lighttpd/php-fastcgi.socket-0 or the above.

Ta

link|improve this answer
feedback

Verify that the /tmp/php-fastcgi.socket file exists, and if it doesn't, run

# touch /tmp/php-fastcgi.socket

then make sure the permissions and ownership/groups are set right with chmod/chown/chgrp. On my server that'd be:

# chmod 664 /tmp/php-fastcgi.socket
# chgrp websrv /tmp/php-fastcgi.socket
link|improve this answer
feedback

The answer is

mkdir -p /var/run/lighttpd/

chown lighttpd /var/run/lighttpd

See http://www.kernelhardware.org/lighttpd-and-centos-5/

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.