Ok, lightTPD is installed... how do i use it

i used the hivelogic article to install ruby on rails to my mac:

everything works great using the script/server command, but isn’t that
still using WEBrick? how do i server my apps with lightTPD?

i tried following the instructions given here:
http://duncandavidson.com/essay/2005/12/railsonlighty

but have had no success so far. when i try running

sudo lighttpd -t -f /etc/lighttpd/lighttpd.conf

i get the following output:

2006-07-05 15:46:26: (plugin.c.165) dlopen() failed for:
/usr/local/lib/modaccesslog.so dlopen(/usr/local/lib/modaccesslog.so,
1): image not found
2006-07-05 15:46:26: (server.c.583) loading plugins finally failed

are there any more resources on server my rails applications with the
lightTPD webserver? i haven’t been able to find much.

i had a typo in the lighttpd command:

sudo lighttpd -f /etc/lighttpd/lighttpd.conf

is what i meant.

I think script/server defaults to lighttpd after the hivelogic install.
You
have to do something like script/server webrick to get webrick. Just
take a
look at the name scrolling by when the server starts up.

:slight_smile:

Stephen S. wrote:

I think script/server defaults to lighttpd after the hivelogic install.
You
have to do something like script/server webrick to get webrick. Just
take a
look at the name scrolling by when the server starts up.

:slight_smile:

ok, i feel dumb. it is lightTPD. this brings up more questions though. i
want lighty to run without me having to call script/server everytime. i
would also like to have multiple apps hosted on the machine.

is there some instruction on doing this with the hivelogic installation
method? is there anything special i need to do?

when i try to start the server on it’s own, i still get:

2006-07-05 15:46:26: (plugin.c.165) dlopen() failed for:
/usr/local/lib/modaccesslog.so dlopen(/usr/local/lib/modaccesslog.so,
1): image not found
2006-07-05 15:46:26: (server.c.583) loading plugins finally failed

i had to create the lighttpd.conf file. i’m wondering if the errors
could be related to a permissions thing or what. setting groups and
permissions aren’t strong points of mine because i’m fairly new to unix.

the tutorial here: http://duncandavidson.com/essay/2005/12/railsonlighty
simply says to just create the config files. not much detail on how to
set the file up.

Hi -

You could take a look at Shovel (http://nubyonrails.com/pages/shovel) or
the
lighttpd.conf file suggested by TextDrive (
http://help.textdrive.com/index.php?pg=file&from=2&id=77) for
inspiration.
I’m not sure what if anything is sacred in the lighttpd.conf.

But these docs should get you started.

:slight_smile:

P.S. - I think you just add a line to your lighttpd.conf in the lighttpd
folder of your server user’s ~/home/USERNAME/var directory and a new
APPNAME.conf for each app in your vhosts folder.
That’s how it works on TextDrive, anyway.