# Apache vs. Lighttpd

**URL:** <https://www.ruby-forum.com/t/apache-vs-lighttpd/48221>\
**Category:** Rails\
**Created:** [November 17, 2005, 10:05pm UTC](https://www.ruby-forum.com/t/apache-vs-lighttpd/48221 "2005-11-17T22:05:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cool\_screen\_name900](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c68b51/32.png) [@cool\_screen\_name900](https://www.ruby-forum.com/u/cool_screen_name900)\
**Post date:** [November 17, 2005, 10:05pm UTC](https://www.ruby-forum.com/t/apache-vs-lighttpd/48221/1 "2005-11-17T22:05:27Z")

</div>

I’m a long time user of Apache - first 1.3.x and then 2.x for about two  
years now I guess. People  
seem to be raving about Lighttpd, and, from what I’ve read, it appears  
to perform much better than  
Apache, especially with lots of connections\*.  
Is Lighttpd easier to configure, setup, etc.? Any other compelling  
reasons to switch to it? I feel  
like I have a lot of stuff added in to Apache (various mods, mod\_rewrite  
rules, etc.) - maybe use  
them both in parallel?

thanks  
csn

- Yesterday I received over 20,000 visits from Googlebot to one site,  
and many more hits to other  
sites from Googlebot and other bots - server load was around 8-10 most  
of the day. (These sites  
don’t use much caching - client or server side - but I plan on switching  
them to Rails and  
utilizing its caching).

---

<div class="post-metadata">

**Author:** ![cool\_screen\_name900](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c68b51/32.png) [@cool\_screen\_name900](https://www.ruby-forum.com/u/cool_screen_name900)\
**Post date:** [November 17, 2005, 10:29pm UTC](https://www.ruby-forum.com/t/apache-vs-lighttpd/48221/2 "2005-11-17T22:29:36Z")

</div>

I’m using lighttpd and it’s very easy to configure for Rails use.  
As for performance, you can read one case of Apache vs lighttpd at  
Textdrive:  
[http://weblog.textdrive.com/article/44/taking-a-full-frontal-slashdot-lighttpdly](http://weblog.textdrive.com/article/44/taking-a-full-frontal-slashdot-lighttpdly)

Regards, Bill

---

<div class="post-metadata">

**Author:** ![cool\_screen\_name900](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c68b51/32.png) [@cool\_screen\_name900](https://www.ruby-forum.com/u/cool_screen_name900)\
**Post date:** [November 17, 2005, 10:56pm UTC](https://www.ruby-forum.com/t/apache-vs-lighttpd/48221/3 "2005-11-17T22:56:48Z")

</div>

Support for mod\_proxy’s rewriting rules in lighttpd is lacking.  
Mod\_spelling, mod\_svn are both missing.

Apart from that I have found no reason to use apache any more. Lighttpd  
is  
faster, less of a memory hog and it is very easy to configure. The main  
thing I like about lighttpd is its conditional based config file. You  
can  
even do nested conditionals, which allows you to do somethings you can’t  
do  
in apache (like forcing a certain virtual host to use a https  
connection).

For example to do a virtual host you do:

$HTTP[‘host’] =~ ‘some regex expression’ {  
some stuff  
like server.document-root = /some/where/else  
or a fastcgi thing  
}

Miles

---

<div class="post-metadata">

**Author:** ![cool\_screen\_name900](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c68b51/32.png) [@cool\_screen\_name900](https://www.ruby-forum.com/u/cool_screen_name900)\
**Post date:** [November 18, 2005, 1:01am UTC](https://www.ruby-forum.com/t/apache-vs-lighttpd/48221/4 "2005-11-18T01:01:13Z")

</div>

2005/11/17, Miles Wu [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> Support for mod\_proxy’s rewriting rules in lighttpd is lacking.

It has mod\_proxy module but it is very limited if compared to Apache.  
It has also mod\_rewrite but again it is very limited if compared to  
Apache. E.g. there is no way for using lighttpd instead of Apache for  
Zope/Plone. mod\_rewrite can map only to local url. And mod\_rewrite can  
map only to IP instead of full URL… I am using Plone with several  
virtual hosts and one IP. Lighttpd cannot do  
RewriteRule ^/(.\*) [http://host.domain:8080/$1](http://host.domain:8080/$1) [P,L]  
nor  
ProxyPass / [http://host.domain:8080/](http://host.domain:8080/)

–  
JZ

---

<div class="post-metadata">

**Author:** ![cool\_screen\_name900](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c68b51/32.png) [@cool\_screen\_name900](https://www.ruby-forum.com/u/cool_screen_name900)\
**Post date:** [November 18, 2005, 3:13am UTC](https://www.ruby-forum.com/t/apache-vs-lighttpd/48221/5 "2005-11-18T03:13:48Z")

</div>

> Mod\_spelling, mod\_svn are both missing.  
> …  
> Support for mod\_proxy’s rewriting rules in lighttpd is lacking.

We are usually combining it with reverse proxy (pound) - [  
[apsis.ch](http://apsis.ch/pound/) ].  
lighttpd (and apache if needed for something - svn etc.) started on  
127.0.0.1, different ports. Based on url pound forward requests to  
lighttpd or apache (or even resin for java stuff). Helps also with  
load balancing/failover detection. Also pound handle all HTTPS stuff,  
so even web servers with missing support for it (https) are OK.
