# Error starting lighttpd

**URL:** <https://www.ruby-forum.com/t/error-starting-lighttpd/58644>\
**Category:** Rails\
**Created:** [April 24, 2006, 12:36pm UTC](https://www.ruby-forum.com/t/error-starting-lighttpd/58644 "2006-04-24T12:36:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![conz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a5b964/32.png) [@conz](https://www.ruby-forum.com/u/conz)\
**Post date:** [April 24, 2006, 12:36pm UTC](https://www.ruby-forum.com/t/error-starting-lighttpd/58644/1 "2006-04-24T12:36:21Z")

</div>

Hi, I’m getting the following error message when I try to start  
lighttpd:

BEGIN ERROR:

$ script/server  
=\> Booting lighttpd (use ‘script/server webrick’ to force WEBrick)  
=\> Rails application started on [http://0.0.0.0:3000](http://0.0.0.0:3000)  
=\> Call with -d to detach  
=\> Ctrl-C to shutdown server (see config/lighttpd.conf for options)  
2006-04-24 03:29:39: (mod\_fastcgi.c.1022) execve failed for:  
public/dispatch.fcgi No such file or directory  
2006-04-24 03:29:39: (mod\_fastcgi.c.1048) the fastcgi-backend  
public/dispatch.fcgi failed to start:  
2006-04-24 03:29:39: (mod\_fastcgi.c.1052) child exited with status 2  
public/dispatch.fcgi  
2006-04-24 03:29:39: (mod\_fastcgi.c.1055) if you try do run PHP as  
FastCGI backend make sure you use the FastCGI enabled version.  
You can find out if it is the right one by executing ‘php -v’ and it  
should display ‘(cgi-fcgi)’ in the output, NOT (cgi) NOR (cli)  
For more information check  
[http://www.lighttpd.net/documentation/fastcgi.html#preparing-php-as-a-fastcgi-program](http://www.lighttpd.net/documentation/fastcgi.html#preparing-php-as-a-fastcgi-program)  
2006-04-24 03:29:39: (mod\_fastcgi.c.1060) If this is PHP on Gentoo add  
fastcgi to the USE flags  
2006-04-24 03:29:39: (mod\_fastcgi.c.1356) [ERROR]: spawning fcgi failed.  
2006-04-24 03:29:39: (server.c.834) Configuration of plugins failed.  
Going down.  
Exiting

END ERROR:

Thanks in advance,

-Conrad

---

<div class="post-metadata">

**Author:** ![conz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a5b964/32.png) [@conz](https://www.ruby-forum.com/u/conz)\
**Post date:** [April 24, 2006, 1:01pm UTC](https://www.ruby-forum.com/t/error-starting-lighttpd/58644/2 "2006-04-24T13:01:10Z")

</div>

Conrad T. wrote:

> public/dispatch.fcgi No such file or directory  
> Check that your lighttpd.conf is definitely pointing at your public  
> directory (remembering that different versions handle relative paths in  
> different ways), and then check that dispatch.fcgi is set to be  
> executable. It’s usually one of those two…

---

<div class="post-metadata">

**Author:** ![conz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a5b964/32.png) [@conz](https://www.ruby-forum.com/u/conz)\
**Post date:** [April 24, 2006, 1:19pm UTC](https://www.ruby-forum.com/t/error-starting-lighttpd/58644/3 "2006-04-24T13:19:41Z")

</div>

Conrad T. wrote:

> Is this the correct behavior when you create a new projtect?  
> The lighttpd.conf file doesn’t get created until you run script/server  
> the first time. The fact that you’re not seeing it tells me there’s  
> something else wrong, but you should be able to copy the config file  
> from gems/rails-1.1.2/configs/lighttpd.conf to your config directory to  
> get past this problem.

---

<div class="post-metadata">

**Author:** ![conz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a5b964/32.png) [@conz](https://www.ruby-forum.com/u/conz)\
**Post date:** [April 24, 2006, 1:13pm UTC](https://www.ruby-forum.com/t/error-starting-lighttpd/58644/4 "2006-04-24T13:13:31Z")

</div>

Hi, I just did some checking and it seems that the lighttpd.conf isn’t  
being generated. BTW, I’m using Ruby 1.8.4 and Rails 1.1.2. Thus, I  
only have the following files within  
the config directory:

boot.rb  
database.yml  
environment.rb  
environments  
routes.rb

Is this the correct behavior when you create a new projtect?

Thanks in advance,

-Conrad

---

<div class="post-metadata">

**Author:** ![conz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a5b964/32.png) [@conz](https://www.ruby-forum.com/u/conz)\
**Post date:** [April 24, 2006, 1:25pm UTC](https://www.ruby-forum.com/t/error-starting-lighttpd/58644/5 "2006-04-24T13:25:47Z")

</div>

Conrad T. wrote:

> public/dispatch.fcgi No such file or directory  
> 2006-04-24 03:29:39: (mod\_fastcgi.c.1060) If this is PHP on Gentoo add  
> fastcgi to the USE flags  
> 2006-04-24 03:29:39: (mod\_fastcgi.c.1356) [ERROR]: spawning fcgi failed.  
> 2006-04-24 03:29:39: (server.c.834) Configuration of plugins failed.  
> Going down.  
> Exiting

Try using absolute path to dispatch.fcgi in your config/lighttpd.conf:

fastcgi.server = ( “.fcgi” =\>  
( “localhost” =\>  
(  
“min-procs” =\> 1,  
“max-procs” =\> 1,  
“socket” =\> “log/fcgi.socket”,  
“bin-path” =\> “Absolute\_Path/public/dispatch.fcgi”,  
“bin-environment” =\> ( “RAILS\_ENV” =\> “development” )  
)  
)  
)

Eszter

---

<div class="post-metadata">

**Author:** ![conz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a5b964/32.png) [@conz](https://www.ruby-forum.com/u/conz)\
**Post date:** [April 24, 2006, 1:38pm UTC](https://www.ruby-forum.com/t/error-starting-lighttpd/58644/6 "2006-04-24T13:38:13Z")

</div>

Conrad T. wrote:

> Hi, I guess when I moved the all the rails projects from ruby.dir to  
> ruby.dir/rails\_apps this may have put the lighttpd.conf out of sync.  
> Thus, I removed the file and I’m rocking and rolling again. Thanks  
> for all you help. Gotta go and thanks again.  
> No worries 🙂

---

<div class="post-metadata">

**Author:** ![conz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a5b964/32.png) [@conz](https://www.ruby-forum.com/u/conz)\
**Post date:** [April 24, 2006, 1:28pm UTC](https://www.ruby-forum.com/t/error-starting-lighttpd/58644/7 "2006-04-24T13:28:49Z")

</div>

Hi, I guess when I moved the all the rails projects from ruby.dir to  
ruby.dir/rails\_apps this may have put the lighttpd.conf out of sync.  
Thus, I removed the file and I’m rocking and rolling again. Thanks  
for all you help. Gotta go and thanks again.

-Conrad
