# Lighttpd

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Lighttpd
> Markdown URL: https://mediated.wiki/source/Lighttpd.md
> Source: https://en.wikipedia.org/wiki/Lighttpd
> Source revision: 1353523290
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{Short description|Web server}}
{{Lowercase title}}
{{Infobox software
| name                   = lighttpd
| title                  = lighttpd
| logo                   = Lighttpd logo.svg
| screenshot             = 
| screenshot size        = 
| caption                = 
| collapsible            = 
| author                 = [Jan Kneschke](/source/Jan_Kneschke)
| released               = {{Start date and age|2003|03}}
| latest release version = {{wikidata|property|preferred|references|edit|Q217765|P348|P548=Q2804309}}
| latest release date    = {{start date and age|{{wikidata|qualifier|preferred|single|Q217765|P348|P548=Q2804309|P577}}}}
| latest preview version = 
| latest preview date    = 
| programming language   = [C](/source/C_(programming_language))
| language               = English
| genre                  = [Web server](/source/Web_server)
| license                = [BSD-3-Clause](/source/BSD_licenses)
}}

'''lighttpd''' (prescribed pronunciation: "lighty")<ref>{{cite web|url=http://www.lighttpd.net/|title=lighttpd fly light|access-date=2010-06-13|quote=all of these describe lighttpd (pron. lighty)}}.</ref> is an open-source [web server](/source/web_server) optimized for speed-critical environments. It was originally written by Jan Kneschke as a [proof-of-concept](/source/proof-of-concept) of the [c10k problem](/source/c10k_problem) – how to handle 10,000 connections in parallel on one server,<ref>
{{Cite web| url=http://www.lighttpd.net/story| title=lighttpd: Story| access-date=22 December 2008| publisher=lighttpd.net}}</ref>
but has gained worldwide popularity.<ref>{{Cite web| url=http://trac.lighttpd.net/trac/wiki/PoweredByLighttpd| title=Powered By lighttpd| access-date=22 December 2008| publisher=Lighttpd wiki}}</ref> Its name is a [portmanteau](/source/portmanteau) of "light" and "[httpd](/source/httpd)".

==Premise==
The low memory footprint (compared to other web servers),<ref>{{cite web| url=http://wiki.dreamhost.com/Web_Server_Performance_Comparison| title=Web Server Performance Comparison| access-date=15 March 2012| archive-url=https://web.archive.org/web/20160605174449/http://wiki.dreamhost.com/Web_Server_Performance_Comparison| archive-date=5 June 2016| url-status=dead}}.</ref> small [CPU](/source/central_processing_unit) load and speed optimizations<ref>Gabriel Kerneis and Juliusz Chroboczek. [http://www.pps.jussieu.fr/~jch/research/cpc-bench.pdf ''Are events fast?'']. PPS technical report, University of Paris 7. 2009.</ref>  make lighttpd suitable for servers that are suffering load problems, or for serving static media separately from dynamic content. lighttpd is [free and open-source software](/source/free_and_open-source_software) and is distributed under the [BSD license](/source/BSD_license). It runs natively on [Unix-like](/source/Unix-like) operating systems, with experimental support for [Microsoft Windows](/source/Microsoft_Windows).<ref>{{cite web |url=https://redmine.lighttpd.net/projects/lighttpd/wiki/Release-1_4_70|title=lighttpd release 1.4.70|access-date=2023-05-10}}</ref>

==Application support==
lighttpd supports the [FastCGI](/source/FastCGI), [SCGI](/source/Simple_Common_Gateway_Interface) and [CGI](/source/Common_Gateway_Interface) interfaces to external programs, allowing web applications written in any programming language to be used with the server.  As a particularly popular language, [PHP](/source/PHP) performance has received special attention. Lighttpd's FastCGI can be configured to support PHP with [opcode caches](/source/PHP_accelerator) (like [APC](/source/Alternative_PHP_Cache)) properly and efficiently. Additionally, it has received attention from its popularity within the [Python](/source/Python_(programming_language)), [Perl](/source/Perl), [Ruby](/source/Ruby_(programming_language)) and [Lua](/source/Lua_(programming_language)) communities. Lighttpd also supports WebDNA, the resilient [in-memory database](/source/in-memory_database) system designed to build database-driven websites. It is a popular web server for the [Catalyst](/source/Catalyst_(software)) and [Ruby on Rails](/source/Ruby_on_Rails) web frameworks. Lighttpd does not support [ISAPI](/source/Internet_Server_Application_Programming_Interface).

==Features==
* [Load balancing](/source/Load_balancing_(computing)), [CGI](/source/Common_Gateway_Interface), [FastCGI](/source/FastCGI), [SCGI](/source/Simple_Common_Gateway_Interface), [HTTP proxy](/source/HTTP_proxy), Servlet [AJP](/source/Apache_JServ_Protocol), [WebSocket](/source/WebSocket) tunnel support
* <code>[chroot](/source/chroot)</code> support
* Web server event mechanism performance – <code>select()</code>, <code>poll()</code>, and <code>epoll()</code><ref>{{cite web |title= Comparing and Evaluating epoll, select, and poll Event Mechanisms |first1= Louay |last1= Gammo |first2= Tim |last2= Brecht |first3= Amol |last3= Shukla |first4= David |last4= Pariag |publisher= University of Waterloo |work= Linux Symposium |date= 2004 |volume= 1 |page= 215 |url=https://cs.uwaterloo.ca/~brecht/papers/ols-2004.pdf }}</ref>
* Support for more efficient [event notification](/source/event_notification) schemes like <code>[kqueue](/source/kqueue)</code> and <code>[epoll](/source/epoll)</code>
* Conditional [URL rewriting](/source/URL_rewriting) (mod_rewrite)
* [TLS/SSL](/source/Transport_Layer_Security) with [SNI](/source/Server_Name_Indication) support, via [OpenSSL](/source/OpenSSL), [GnuTLS](/source/GnuTLS), [Mbed TLS](/source/Mbed_TLS), [NSS](/source/Network_Security_Services), [WolfSSL](/source/WolfSSL).<ref>{{cite web |author1=gstrauss |title=1.4.56 - Lighttpd - fly light |url=https://www.lighttpd.net/2020/11/29/1.4.56/ |website=Lighttpd |access-date=2023-06-02 |date=2020-11-29}}</ref>
* Authentication against an [LDAP](/source/Lightweight_Directory_Access_Protocol) or DBI server
* [RRDtool](/source/RRDtool) statistics
* Rule-based downloading with possibility of a script handling only authentication
* [Server Side Includes](/source/Server_Side_Includes) support (but not server-side CGI from SSI)<ref>[http://redmine.lighttpd.net/issues/show/1101 Lighttpd - Bug #1101: SSI include virtual does not run cgi] – lighty labs</ref>
* Flexible [virtual hosting](/source/virtual_hosting)
* Modules support
* [Lua programming language](/source/Lua_(programming_language)) scripts via mod_magnet<ref>{{Cite web|url=http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModMagnet|title = Docs ModMagnet - Lighttpd - lighty labs}}</ref> 
* [WebDAV](/source/WebDAV) support
* [HTTP compression](/source/HTTP_compression) using mod_deflate (zlib, brotli, zstd)
* Light-weight (less than 1 [MB](/source/Megabyte))<ref>
{{Cite web| url=http://download.lighttpd.net/lighttpd/| title=lighttpd releases| access-date=20 June 2010| publisher=lighttpd.net}}</ref>
* Single-process design with only several threads. No processes or threads started per connection.
* [HTTP/2](/source/HTTP%2F2) support since lighttpd 1.4.56
* [HTTP/2](/source/HTTP%2F2) [WebSocket](/source/WebSocket) support since lighttpd 1.4.65
* [TLS Encrypted Client Hello (ECH)](/source/Server_Name_Indication)  support since lighttpd 1.4.77<ref>{{Cite web|url=http://wiki.lighttpd.net/TLS_ECH|title = lighttpd TLS ECH}}</ref>

==Limitations==
* Versions below 1.4.40 do not officially support sending large files from CGI, FastCGI, or proxies<ref>{{cite web|url =http://redmine.lighttpd.net/issues/1283|title = Memory usage increases when proxy+ssl+large file|publisher=lighttpd bug tracker|access-date= 2011-04-11}}</ref> unless X-Sendfile is used.  This limitation has been removed in lighttpd 1.4.40.<ref>{{cite web|url =https://redmine.lighttpd.net/issues/933|title = lighty should buffer responses (after it grows above certain size) on disk|publisher=lighttpd bug tracker|access-date= 2016-07-16}}</ref>
* No [HTTP/3](/source/HTTP%2F3) support

==Usage==
Lighttpd was used in the past by several high-traffic websites, including [Bloglines](/source/Bloglines), [xkcd](/source/xkcd), [Meebo](/source/Meebo), and [YouTube](/source/YouTube).<ref>{{cite web|url = http://www.serverwatch.com/stypes/servers/article.php/17191_3678346|title = Fly Light With Lighttpd Web Server| publisher = ServerWatch | access-date = 2008-02-12|archive-url=https://web.archive.org/web/20140331045948/http://www.serverwatch.com/stypes/servers/article.php/17191_3678346|archive-date=31 March 2014}}</ref>{{better ref needed|date=July 2015}} The [Wikimedia Foundation](/source/Wikimedia_Foundation) also once ran Lighttpd servers.<ref>{{cite web
| url=http://www.lighttpd.net/2007/4/4/powered-by-lighttpd
| title=Powered by Lighttpd
| publisher=The official site
| date=2007-04-04
| quote=lighttpd is used by many well-known sites. The typical scenario is using lighttpd as off-load server to push out static content and leave the complex work to another server.
| access-date=2008-12-22}}</ref>
Due to relatively small size it's often used in embedded devices like GL.iNet and [Turris Omnia](/source/Turris_Omnia).

It's also used by [git](/source/git) as a HTTP server daemon.

==See also==<!-- PLEASE RESPECT ALPHABETICAL ORDER -->
{{Portal|Free and open-source software}}
* [Comparison of web server software](/source/Comparison_of_web_server_software)
* [Internet Cache Protocol](/source/Internet_Cache_Protocol)
* [Proxy server](/source/Proxy_server) which discusses client-side proxies
* [Reverse proxy](/source/Reverse_proxy) which discusses origin-side proxies
* [Traffic Server](/source/Traffic_Server)
* [Web accelerator](/source/Web_accelerator) which discusses host-based HTTP acceleration

==References==
{{Reflist}}

==Further reading==
{{refbegin}}
* {{cite book
| first1      = Andre
| last1       = Bogus
| date        = October 29, 2008
| title       = Lighttpd
| publisher   = [Packt Publishing](/source/Packt_Publishing)
| edition     = 1st
| page        = 236
| isbn        = 978-1847192103
| url         = https://www.packtpub.com/lighttpd/book
}}
{{refend}}

==External links==
* {{Official website}}

{{Web server software}}

Category:Cross-platform free software
Category:Free software programmed in C
Category:Free web server software
Category:Unix network-related software
Category:Web server software for Linux
Category:Windows Internet software

---
Adapted from the Wikipedia article [Lighttpd](https://en.wikipedia.org/wiki/Lighttpd) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Lighttpd?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
