Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

4 Answers 4

up vote 3 down vote accepted

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

share|improve this answer
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

share|improve this answer

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
share|improve this answer

The answer is

mkdir -p /var/run/lighttpd/

chown lighttpd /var/run/lighttpd

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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