LightHttpd vs Nginx

11,481

Both have pretty excellent performance. Using FastCGI with Lighttpd is a bit easier, because it is able to spawn processes by itself (downside is that it runs fastcgi servers as the same user as the webserver), while nginx requires a bit of manual work. Both are perfectly capable of acting as reverse proxy and load balancers.

If you need good performance, I'd also suggest to use nginx as front-end to serve static files, and Apache backend. While this requires more RAM, nginx+apache2+mod_php is somehow faster than nginx+php-fastcgi. I currently have no proof benchmarks, though, so take this statement with a grain of salt.

Also, IMHO nginx has somehow more human-friendly configuration file syntax, but opinions may vary.

Share:
11,481
Admin
Author by

Admin

Updated on June 04, 2022

Comments

  • Admin
    Admin almost 2 years

    Ok, I have seen this question quite a few times here on SO and as well as elsewhere on the web. But..they are all pretty old, so I will post it again.

    I have the following needs:

    1. Ability to handle lots of simultaneous HTTP connections (like comet). This is the reason I am looking at other webservers rather than apache.

    2. Should be easy to install and run PHP

    3. Need reverse proxy for channeling certain requests to an alternate web server (apache or yaws) on another port.

    I know nginx does not have fast cgi support by default. While lighthttpd seems to have that, I read complaints about memory leaks. Is the memory leak problem still prevalent?

    What would you recommend now: nginx or lighthttpd? Or something else? Why?