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 am trying to configure Lighttpd to run Redmine using FastCGI. I have added the following code to my standard lighttpd.conf:

$HTTP["host"] =~ "^foo.bar.com$" {
  server.document-root  = "/usr/share/redmine/public/"
  index-file.names += ( "dispatch.fcgi" ) #dispatch.fcgi if rails specified
  server.error-handler-404   = "/dispatch.fcgi" #too
  fastcgi.server = (
    ".fcgi" => (
      "localhost" => (
        "socket" => "/var/run/lighttpd/rails-fastcgi.sock",
        "bin-path" => "/usr/share/redmine/public/dispatch.fcgi"
      )
    )
)
}

when I try to start the lighttpd server I get the following in the error log:

May 11 10:24:05 ohio lighttpd[5527]: (log.c.166) server started 
May 11 10:24:05 ohio lighttpd[5527]: (mod_fastcgi.c.977) bind failed for: unix:/var/run/lighttpd/rails-fastcgi.sock-0 No such file or directory 
May 11 10:24:05 ohio lighttpd[5527]: (mod_fastcgi.c.1397) [ERROR]: spawning fcgi failed. 
May 11 10:24:05 ohio lighttpd[5527]: (server.c.945) Configuration of plugins failed. Going down.

Can anyone help me with why the bind keeps failing?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

The problem is that Lighttpd is failing to execute the FCGI program. Try setting fastcgi.debug = 1 and check if any more detail shows up in the error log. If that doesn't help, try executing /usr/share/redmine/public/dispatch.fcgi as the user which Lighttpd runs as (either lighttpd or www-data depending on the distro).

share|improve this answer

This is a good clue:

bind failed for: unix:/var/run/lighttpd/rails-fastcgi.sock-0 No such file or directory

Lighttpd does not create directories; it expects to be able to create the socket file.

Either the directory "/var/run/lighttpd" does not exist, or the web server user does not have write permissions to that directory.

ls -ld /var/run/lighttpd/

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.