Lighthttpd not working as default (configuration?)

Hi,

On the api doc it is written that if lighttpd is installed, rails will
use it as its web server instead of WebBrick.

I have installed lighthttpd and verified it works (for example on the
default port 80) but when lauching script/server, it still uses
WebBrick.

I wondering if I need to edit /etc/lighttpd/lighthttpd.conf myself or
configure something else.

Any idea?

Thanks

Oscar


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

lighthttpd is on the path.

which lighttpd => ~/bin/lighttpd

It’s actually a symlink to /usr/sbin/lighttpd

I have installed it as root. I tried to launch it from the command line
but i failed with
(server.c.597) opening pid-file failed: /var/run/lighttpd.pid Permission
denied

/var/run is not writable for non root users. I’ll try to investigate
further.

Peter T Bosse II [email protected] wrote: Make sure the path to lighttpd
is in your path.� Try this:

which lighttpd

did it give you the path to lighttpd?� (On my system it’s installed in
/usr/local/sbin/lighttpd)��Where is lighttpd installed?� Is that
directory in your path?� Try this:

echo $PATH

If the path to lighttpd isn’t listed you’ll need to add it.� Look in
~/.bash_profile or /etc/profile

  • Peter

P.S. This all assumes you’re running Rails on Mac OS X or some other
unix-y type system.

On Apr 5, 2006, at 5:20 PM, Oscar Picasso wrote:

Hi,

On the api doc it is written that if lighttpd is installed, rails will
use it as its web server instead of WebBrick.

I have installed lighthttpd and verified it works (for example on the
default port 80) but when lauching script/server, it still uses
WebBrick.

I wondering if I need to edit /etc/lighttpd/lighthttpd.conf myself or
configure something else.

Any idea?

Thanks

Oscar


Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great
rates starting at
1�/min._______________________________________________
Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

you can force lighttpd by giving it as an option as ‘script/server
lighttpd’ if it can’t run it, most likely it’s not in your path.

script/server will look to see if it can run lighttpd (it tries to run
‘lighttpd -version’). if it can, it will copy a default lighttpd.conf
file
from the RAILS_ROOT/configs/ to yourapp/config/ unless it already
exists.
the server script then runs lighttpd with -f option for this new config
file, which is tailor made (port/ip, log paths, etc) for running your
app
without requiring root access.

check out

RAILS_ROOT/lib/commands/server.rb and
RAILS_ROOT/lib/commands/servers/lighttpd.rb
RAILS_ROOT/configs/lighttpd.conf

for more information on the process.