Difference WikiTechnologyWeb

Difference Between Apache and Lighttpd

Main Difference

The biggest difference is that Lighttpd doesn’t have the same URL rewriting flexibility as Apache. Any URL rewriting has to be put directly into the Lighttpd configuration files as opposed to the .htaccess files ubiquitous in Apache installs.

What is Apache?

The Apache HTTP Server, colloquially called Apache, is the world’s most used web server software. Originally based on the NCSA HTTPd server, development of Apache began in early 1995 after work on the NCSA code stalled. Apache has support for CGI/FastCGI. It is proven and its implementation hasn’t changed in years. You might find documentation more than ten years old, and still be valid.

ADVERTISEMENT

What is Lighttpd?

Lighttpd is an open-source web server optimized for speed-critical environments while remaining standards-compliant, secure and flexible. Lighttpd supports X-Sendfile since version 1.5. Apache 1 does not support X-Sendfile. Lighttpd is distributed under the terms of the Revised BSD License, a three-clause, copyfree variant of the BSD License.

Key Differences

  1. Nginx and Lighttpd are probably the two best-known asynchronous servers and Apache is undoubtedly the best known process-based server.
  2. Most tests show that there is an inherent performance increase in using Lighttpd over Apache.
  3. Apache has support for CGI/FastCGI. It is proven and its implementation hasn’t changed in years. You might find documentation more than ten years old, and still be valid. Lighttpd has support for CGI and FastCGI via module
  4. Lighttpd supports X-Sendfile since version 1.5. Apache 1 does not support X-Sendfile. For Apache2, there is a 3rd party module.
  5. Rewriting in Apache can be handled at a config (site level) or via override in the state of .htaccess. In Lighttpd you’re restricted to rewriting via the config level only, which means for things like WordPress you will need to hard code the rewrite rule in.
  6. Lighttpd is distributed under the terms of the Revised BSD License, a three-clause, copyfree variant of the BSD License. This licensing choice significantly reduces collaborative friction between Lighttpd code and that of other projects distributed under other licenses, and imposes no notable restrictions on software development related to Lighttpd. Apache uses the eponymous Apache License 2.0, a license sometimes considered “permissive” in that it is an open source license that is not a copyleft license.
  7. PHP installation is not quite as straight forward on Lighttpd as in Apache because there’s no module for it.
ADVERTISEMENT

Comparison Video

YouTube video
Harlon Moss

Harlon currently works as a quality moderator and content writer for Difference Wiki. He graduated from the University of California in 2010 with a degree in Computer Science. Follow him on Twitter @HarlonMoss