Take the 2-minute tour ×

I'd like to use Lighttpd in production for serving Django apps but i see that these days Nginx is more and more popular. Why is that? I'm aware that in the past Lighttpd had memory leaks but isn't this fixed now? They do have active developers that fix this kind of things don't they?
Is there any reason i should go with Nginx instead of Lighty? I know that nginx is a great server but is it really that good and better than lighty?


locked by sysadmin1138 Aug 22 '13 at 21:18


Who says one is more popular than the other? Based on what data? –  John Gardeniers Feb 20 '10 at 20:15
based on every blog/website that i see/read, based on the number of questions serverfault has for example lighttpd=87, nginx=160 and the list can continue. I was a really big fan of lighttpd but i'm thinking in giving nginx a try. –  daniels Feb 20 '10 at 20:48

6 Answers 6

up vote 17 down vote accepted

I'm a current nginx user and previous lighttpd user and I can only echo the stability issue. Furthermore nginx has active development and often sees a new version released every couple of weeks with new features or minor bug fixes. The configuration file is also quite clear and very powerful once you learn the nginx way of doing things.

I know this is a well meaning answer, but it doesn't show very much in evidence. You could have linked to the roadmap pages for both lighttpd and nginx –  Ehtesh Choudhury Aug 31 '12 at 4:37
This answer is also two and a half years old. The nginx roadmap didn't even exist back then. –  Martin Fjordvald Aug 31 '12 at 12:30

Nginx can also be used as a load balancer (although haproxy is probably a little better at this if you don't need SSL).

Nginx can also be used as an SSL reverse-proxy, which is huge if you use SSL on multiple virtual hosts. This is probably the single biggest reason for nginx Netcraft numbers and nginx author said in a recent interview he thought this was the reason for a majority of deployments. It's certainly why I started using it... and then was shocked at the performance gains I was seeing :)


I recently did a side by side evaluation of lighttpd and nginx on the same server for a new project I am working on. Nginx performed slightly better than Lighttpd in my tests, and we have put nginx into production as a result. FWIW Netcraft reports about nginx is much more widely used than lighttpd on outward facing web servers: http://news.netcraft.com/


I am using both, nginx and lighttpd very successfully on a >500k hits/day website. Lighttpd (core) memory leaks must be a myth, I didnt experience any problems in all this time.

Nginx is great. Simple configuration, small memory and cpu footprint even with a lot of traffic, lightning fast and very stable.

In our case nginx is doing the reverse proxy caching, load balancing and url rewrites while lighttpd + spawncgi + php comes in handy as backend server doing the script execution.

I haven't tested the fastcgi interface of nginx very much yet, so I cannot say how good this works. php-fpm + nginx for static files could replace lighttpd

Update: Nginx + php-fpm works like a charm. Setting up php-fpm correctly still is a bit difficult. nginx is able to communicate to fpm using a socket file or network, which makes this combination very flexible and easy to scale out. Server load decreased slightly compared to lighttpd + php fastcgi –  Michel Feldheim Sep 21 '12 at 14:11

Found a VS page on the both, here is a little snip:


As of August 2009, lighttpd still has unsolved memory leaks issues reported 3 years ago. One problem with Lighty is that it leaks memory like a sieve. I audited it for a little bit and I gave up, it's a mess. I'd steer clear of it, it will quickly ruin your day if you throw a lot of traffic at it."

Source: http://www.wikivs.com/wiki/Lighttpd_vs_nginx

Honestly, I haven't used nginx so I cannot speak from experience. I primarily used apache on my web server, but I have one at home which uses lighttpd. It only serves a small html only page and is only accessible by VPN, so it's more of an information portal when someone remote's in.

When I next get my head down and start experimenting with new and updated server side apps, I'll probably play with nginx. At the end of the day, it's your own choice, but depending if its going to be for a production environment, I would research both before committing to either.


I dont know much about lighttpd but reading from the below link, I learned that lighttpd runs as a single process with a single thread whereas nginx makes use of master and multiple worker processes.


Lighttpd runs as a single process with a single thread and non-blocking I/O.

nginx works as one master process but delegates its work unto worker processes.

So this makes nginx better suited to take advantage of multiple core systems, nowadays almost all the devices ship with multiple cores.

