3

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.

3

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

2

Got Fixed with following changes:

  • mkdir /var/run/lighttpd
  • touch /var/run/lighttpd/php-fastcgi.socket
  • chown -R lighttpd:lighttpd /var/run/lighttpd

Where lighttpd is the username.

Updating socket in lighttpd.conf to point to /var/run/lighttpd/php-fastcgi.socket solves the problem.

unix:/var/run/lighttpd/php-fastcgi.socket-0 No such file or directory

1

The answer is

mkdir -p /var/run/lighttpd/

chown lighttpd /var/run/lighttpd

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

0
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

0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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