I've been looking into lighttpd and nginx for a server with low memory. I'm somewhat familiar with lighttpd, but there is an online rumor that it has memory leaks. I'll serve mostly static pages and some FastCGI pages.
Any advice on which one to use would be greatly appreciated.<p>[Note: I moved here from Reddit and I don't think I'm going back there anymore. Reddit is becoming the new Digg]
I've used Lighttpd, Cherokee, Nginx and of course Apache (although stripped down for speed) on a high load production site for serving static files and reverse proxying.<p>Nginx wins no contest. Highly stable, serving for almost 2 years now with zero issues.<p>Lots of features, much simpler config, uses less resources.<p>Hot config reloading. Hot binary upgrading.<p>Low grade? Hardly.<p>Issues with others:<p>Lighttpd - configing slightly annoying, uses more cpu and memory<p>Apache - slow performance and memory hog even when stripped of all it's extra modules, (just try and support 5000 keep alive connections on it)<p>Cherokee - very nice, well thought out and featureful and fast but had some stability problems in production, I may take a look at it again later on because it has a sweet admin interface
nginx hands down. nginx is probably the most stable piece of software with the least problems we run here at engineyard. We've had thousands of nginx instances in production for years now and I can truly say it is one of my favorite pieces of software.
I'm not a heavy user of nginx although I've read more than I care to about all of the various options lately.. and my single data point is that nginx would be the better option <i>of the two</i> right now.
Have a look at mathopd: <a href="http://www.mathopd.org/" rel="nofollow">http://www.mathopd.org/</a>. Very lightweight and stable/mature, and unlike lighttpd, an excellent security track record.
I use Apache Web Server on a four year old server. It hasn't gone down outside of two server moves. Coming from the Java application server and IIS worlds, it's seems pretty simple to me. It seemed to be a more widely supported choice amongst my customers, and thus worth my time to invest in learning it.
To add my voice to the chorus: Nginx, hands down. It's a great piece of software - simple enough to configure, small and efficient, and it just works and keeps working. I have literally never seen it crash or do anything it wasn't supposed to do.<p>As for lighttpd, I messed with it a while ago and while it has its advocates, I found it fiddly to install and configure and quite old-fashioned. The arrival of nginx means you don't really need to consider lighttpd, IMO, it's kind of the older, worse version of the same thing.<p>However ...<p>Your other option is of course just sticking with Apache. I don't know the details of your server (maybe should have said?) but it doesn't use <i>that</i> much memory! For many common scenarios using it could be quite a bit easier. Well, it would likely be no work at all actually, since it's probably already installed and running fine. There can be a tendency to over-optimise up front; why not take the path of least resistance, get something up and running with Apache first, then switch if and when you need to? Just a thought ;)