Forum: Ruby on Rails Lighthttpd not working as default (configuration?)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
766e0a2903a7ca68a13536ddd0cce6fd?d=identicon&s=25 Oscar Picasso (Guest)
on 2006-04-06 02:21
(Received via mailing list)
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
46a97bfed2cc82d33f7aedcb5dbc66a5?d=identicon&s=25 Peter T Bosse II (Guest)
on 2006-04-06 06:30
(Received via mailing list)
_______________________________________________
Rails mailing list
Rails@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails
766e0a2903a7ca68a13536ddd0cce6fd?d=identicon&s=25 Oscar Picasso (Guest)
on 2006-04-06 07:01
(Received via mailing list)
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 <ptb@eliving.us> 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
Rails@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails
A2c85dc5ee81b12e3cc0a6522e8d079d?d=identicon&s=25 Chris Hall (Guest)
on 2006-04-06 15:36
(Received via mailing list)
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.
This topic is locked and can not be replied to.