2

I'm running lighttpd-1.4.19 on a debian 5 box and try to run web2py with fastcgi. The problem with that is, that lighttpd does not create the socket file /tmp/fcgi.sock.

If I'm creating the file by myself

 touch /tmp/fcgi.sock

lighttpd will start but will throw this error after some time running:

unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: unix:/tmp/fcgi.sock

My config looks like this:

fastcgi.server = (
  "/handler_web2py.fcgi" => (
      "handler_web2py" => ( #name for logs
        "check-local" => "disable",
        "socket" => "/tmp/fcgi.sock",
        "idle-timeout" => 20,
        "max-procs" => 1
      )
   ),
)

Is there any known problem with running lighttpd on debian 5?

Thanks for any help.

I have pasted the whole lighttpd config: http://pastie.org/1660646

Marlon
  • 21
  • 3

2 Answers2

0

Make sure that when you 'touch' the file that lighttpd still has permissions to access the file.

Secondly, check to make sure that the scgi mod is enabled in lighttpd conf

Lastly, if it is binding to a port less than 1024 (likely is) it needs root or super user level privileges to bind. sudo should be able to have the socket bind to a lower port.

EDIT: ran a quick google search of the error and found this: https://stackoverflow.com/questions/4353351/error-while-setupping-django-under-lighttpd-fastcgi

David Rickman
  • 3,320
  • 18
  • 16
  • 1
    Thanks Dave for your answer. The other topic on SO could no help me. If I chmod the socket file 777 lighttpd will serve the site but will hang after some time. The guys at irc in the #lighttpd room told me that it is no good idea to create the socket file by myself. – Marlon Mar 11 '11 at 19:23
  • It generally isn't but can be used to narrow a problem down. – David Rickman Mar 11 '11 at 19:27
0

Don't you need a bin-path directive in there if you wish to use the process manager from ligthttpd?

Richard Salts
  • 755
  • 3
  • 17