1

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?

2 Answers 2

1

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).

0
0

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/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .