# Lighttpd Question

**URL:** <https://www.ruby-forum.com/t/lighttpd-question/116760>\
**Category:** Radiant CMS\
**Created:** [October 9, 2007, 2:52pm UTC](https://www.ruby-forum.com/t/lighttpd-question/116760 "2007-10-09T14:52:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![richardchaven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e480ec/32.png) [@richardchaven](https://www.ruby-forum.com/u/richardchaven)\
**Post date:** [October 9, 2007, 2:52pm UTC](https://www.ruby-forum.com/t/lighttpd-question/116760/1 "2007-10-09T14:52:37Z")

</div>

Hey all,

I’m got my new production server (Debian) up and running with Lighttpd  
and  
am now trying to get RadiantCMS working. If I try to just run  
“scripts/server lighttpd” it rails saying that Lighttpd is not installed  
on  
my system (or not in my path). Lighttpd most certainly is installed on  
my  
system and it’s running just fine. However I don’t think I want Radiant  
to  
“run” my webserver. How can I just make it use the already existing  
Lighttpd instance? I think I could have Radiant start up Mongrel and  
then  
point Lightthpd to that, but that is quite a lot of moving parts just  
for a  
simple web app. Is there a “scripts/server standalone” option or  
something?

Thanx!  
Richard

---

<div class="post-metadata">

**Author:** ![richardchaven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e480ec/32.png) [@richardchaven](https://www.ruby-forum.com/u/richardchaven)\
**Post date:** [October 9, 2007, 3:16pm UTC](https://www.ruby-forum.com/t/lighttpd-question/116760/2 "2007-10-09T15:16:07Z")

</div>

The typical solution with lighttpd is to use FCGI. You can configure  
lighttpd to either spawn Radiant FCGI processes, or you can start/stop  
them yourself with script/process/spawner and script/process/reaper.  
Mongrel is not necessary.

Sean

---

<div class="post-metadata">

**Author:** ![richardchaven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e480ec/32.png) [@richardchaven](https://www.ruby-forum.com/u/richardchaven)\
**Post date:** [October 9, 2007, 3:34pm UTC](https://www.ruby-forum.com/t/lighttpd-question/116760/3 "2007-10-09T15:34:20Z")

</div>

As Sean as pointed, rails apps are served by lighttpd through fcgi. All  
you need to do is setup lighttpd.conf correctly. These two links are  
useful:

```
 http://duncandavidson.com/archives/153
 http://textsnippets.com/posts/show/70

 /AITOR
```

---

<div class="post-metadata">

**Author:** ![richardchaven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e480ec/32.png) [@richardchaven](https://www.ruby-forum.com/u/richardchaven)\
**Post date:** [October 9, 2007, 7:47pm UTC](https://www.ruby-forum.com/t/lighttpd-question/116760/4 "2007-10-09T19:47:41Z")

</div>

Ok, so I’m a little quick on the draw. Shutting everything down  
completely (read: lighttpd) and starting up fresh worked great. At  
least I  
can log in. I’ll play with it and see if it breaks and see what kind of  
speed I can get out of this thing.

Later…  
Richard

---

<div class="post-metadata">

**Author:** ![richardchaven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e480ec/32.png) [@richardchaven](https://www.ruby-forum.com/u/richardchaven)\
**Post date:** [October 9, 2007, 9:50pm UTC](https://www.ruby-forum.com/t/lighttpd-question/116760/5 "2007-10-09T21:50:40Z")

</div>

Lighttpd and sqlite3 are not related, sqlite/sqlite3 is not compiled  
inside lighttpd. If you still have problems it could be the common  
problem  
with sqlite3 & rails:

```
http://wiki.radiantcms.org/FAQ

A tuned MySQL/Postgre should be faster than sqlite3, but sqlite3 has

```

some administration advantages.

```
/AITOR
```

---

<div class="post-metadata">

**Author:** ![richardchaven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e480ec/32.png) [@richardchaven](https://www.ruby-forum.com/u/richardchaven)\
**Post date:** [October 9, 2007, 7:32pm UTC](https://www.ruby-forum.com/t/lighttpd-question/116760/6 "2007-10-09T19:32:56Z")

</div>

WooHoo, I got it working. However, it looks like there is a problem  
with  
Lighttpd & SQLite3 on Debian stable. Apparently Lighttpd is compiled  
against SQLite instead of SQLite3 and I’m getting all kinds of weird SQL  
errors:

ActiveRecord::StatementInvalid (SQLite3::SQLException: SQL logic error  
or  
missing database: INSERT INTO sessions (“updated\_at”, “session\_id”,  
“data”)  
VALUES(‘2007-10-09 17:24:02’, ‘90ade8e8a03b57f98e3b4ffa55c094f4’,  
'BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo  
SGFzaHsABjoKQHVzZWR7AA==  
')):

This same exact setup works when run against a Postgres database, so I’m  
thinking it’s a SQLite3 library thing. Any suggestions? I like  
Postgres  
and might just keep using it but the simplicity of SQLite3 just makes me  
weep for joy. 🙂 Also, I am curious about the performance differences  
between the two DBMSs. It seems like SQLite3 should perform better for  
smaller sites (as long as you can keep the db file in memory). What do  
you  
think?

Thanx!  
Richard
