Lighttpd
Encyclopedia
lighttpd is an open-source web server
more optimized for speed-critical environments than common products while remaining standards-compliant, secure and flexible. It was originally written by Jan Kneschke as a proof-of-concept of the c10k problem
- how to handle 10,000 connections in parallel on one server,
but has gained worldwide popularity.
load and speed optimizations make lighttpd suitable for servers that are suffering load problems, or for serving static media separately from dynamic content. lighttpd is free software
/open source, and is distributed under the BSD license. It runs natively on Unix-like
operating systems as well as Microsoft Windows
.
, SCGI
and CGI
interfaces to external programs, permitting web applications written in any programming language to be used with the server. As a particularly popular language, PHP
performance has received special attention. Lighttpd's FastCGI can be configured to support PHP with opcode caches
(like APC) properly and efficiently. Additionally, it has received attention from its popularity within the Python
, Perl
, Ruby
and Lua communities. It is a popular web server for the Catalyst
and Ruby on Rails
web frameworks. Lighttpd does not support ISAPI.
and YouTube
. Wikimedia runs Lighttpd servers
as does SourceForge
.
Three of the most famous torrent listing websites, The Pirate Bay
, Mininova
and isoHunt
, which have more than 1,000 hits per second, also use Lighttpd.
Lighttpd currently holds fifth place on the Netcraft
"Web Server Survey" (November 2010).
Web server
Web server can refer to either the hardware or the software that helps to deliver content that can be accessed through the Internet....
more optimized for speed-critical environments than common products while remaining standards-compliant, secure and flexible. It was originally written by Jan Kneschke as a proof-of-concept of the c10k problem
C10k problem
The C10k problem refers to the problem of optimising web server software to handle a large number of clients at the same time . The problem of web server optimisation has been studied because a number of factors must be considered to allow a web server to support many clients...
- how to handle 10,000 connections in parallel on one server,
but has gained worldwide popularity.
Premise
The low memory footprint (compared to other web servers), small CPUCentral processing unit
The central processing unit is the portion of a computer system that carries out the instructions of a computer program, to perform the basic arithmetical, logical, and input/output operations of the system. The CPU plays a role somewhat analogous to the brain in the computer. The term has been in...
load and speed optimizations make lighttpd suitable for servers that are suffering load problems, or for serving static media separately from dynamic content. lighttpd is free software
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...
/open source, and is distributed under the BSD license. It runs natively on Unix-like
Unix-like
A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....
operating systems as well as Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...
.
Application support
lighttpd supports the FastCGIFastCGI
FastCGI is a protocol for interfacing interactive programs with a web server. FastCGI is a variation on the earlier Common Gateway Interface ; FastCGI's main aim is to reduce the overhead associated with interfacing the web server and CGI programs, allowing a server to handle more web page...
, SCGI
Simple Common Gateway Interface
The Simple Common Gateway Interface is a protocol for applications to interface with HTTP servers, as an alternative to the CGI protocol...
and CGI
Common Gateway Interface
The Common Gateway Interface is a standard method for web servers software to delegate the generation of web pages to executable files...
interfaces to external programs, permitting web applications written in any programming language to be used with the server. As a particularly popular language, PHP
PHP
PHP is a general-purpose server-side scripting language originally designed for web development to produce dynamic web pages. For this purpose, PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document...
performance has received special attention. Lighttpd's FastCGI can be configured to support PHP with opcode caches
PHP accelerator
A PHP accelerator is a PHP extension designed to improve the performance of software applications written in the PHP programming language.- Operation :...
(like APC) properly and efficiently. Additionally, it has received attention from its popularity within the Python
Python (programming language)
Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...
, Perl
Perl
Perl is a high-level, general-purpose, interpreted, dynamic programming language. Perl was originally developed by Larry Wall in 1987 as a general-purpose Unix scripting language to make report processing easier. Since then, it has undergone many changes and revisions and become widely popular...
, Ruby
Ruby (programming language)
Ruby is a dynamic, reflective, general-purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features. Ruby originated in Japan during the mid-1990s and was first developed and designed by Yukihiro "Matz" Matsumoto...
and Lua communities. It is a popular web server for the Catalyst
Catalyst (software)
Catalyst is an open source web application framework written in Perl, that closely follows the model–view–controller architecture, and supports a number of experimental web patterns. It is written using Moose, a modern object system for Perl...
and Ruby on Rails
Ruby on Rails
Ruby on Rails, often shortened to Rails or RoR, is an open source web application framework for the Ruby programming language.-History:...
web frameworks. Lighttpd does not support ISAPI.
Features
- Load-balancing FastCGIFastCGIFastCGI is a protocol for interfacing interactive programs with a web server. FastCGI is a variation on the earlier Common Gateway Interface ; FastCGI's main aim is to reduce the overhead associated with interfacing the web server and CGI programs, allowing a server to handle more web page...
, SCGISimple Common Gateway InterfaceThe Simple Common Gateway Interface is a protocol for applications to interface with HTTP servers, as an alternative to the CGI protocol...
and HTTP proxy support -
chroot
supportChrootA chroot on Unix operating systems is an operation that changes the apparent root directory for the current running process and its children. A program that is run in such a modified environment cannot name files outside the designated directory tree. The term "chroot" may refer to the chroot... -
select
-/poll
-/epoll
based web server - Support for more efficient event notification schemes like
kqueue
andKqueueKqueue is a scalable event notification interface introduced in FreeBSD 4.1, also supported in NetBSD, OpenBSD, DragonflyBSD, and Mac OS X. It's the foundation of Apple's Grand Central Dispatch....epoll
Epollepoll is a scalable I/O event notification mechanism for Linux, first introduced in Linux 2.5.44 . It is meant to replace the older POSIX select and poll system calls, to achieve better performance in more demanding applications, where the number of watched file descriptors is large... - Conditional rewrites (mod rewrite)
- SSL and TLSTransport Layer SecurityTransport Layer Security and its predecessor, Secure Sockets Layer , are cryptographic protocols that provide communication security over the Internet...
support, via OpenSSLOpenSSLOpenSSL is an open source implementation of the SSL and TLS protocols. The core library implements the basic cryptographic functions and provides various utility functions...
. - Authentication against an LDAPLightweight Directory Access ProtocolThe Lightweight Directory Access Protocol is an application protocol for accessing and maintaining distributed directory information services over an Internet Protocol network...
server - RRDtoolRRDtoolRRDtool aims to handle time-series data like network bandwidth, temperatures, CPU load, etc...
statistics - Rule-based downloading with possibility of a script handling only authentication
- Server Side IncludesServer Side IncludesServer Side Includes is a simple interpreted server-side scripting language used almost exclusively for the Web.The most frequent use of SSI is to include the contents of one or more files into a web page on a web server...
support (but not server-side CGI ) - Flexible virtual hostingVirtual hostingVirtual hosting is a method for hosting multiple domain names on a server using a single IP address. This allows one server to share its resources, such as memory and processor cycles, in order to use its resources more efficiently....
- Modules support
- Cache Meta LanguageCache Meta LanguageCache Meta Language is a computer programming language used to configure high-speed caching functionality in web server software such as lighttpd, which couples the functionality with that of memcache, a memory-based caching system....
(currently being replaced by mod_magnet) using the Lua programming language - Minimal WebDAVWebDAVWeb-based Distributed Authoring and Versioning is a set of methods based on the Hypertext Transfer Protocol that facilitates collaboration between users in editing and managing documents and files stored on World Wide Web servers...
support - Servlet (AJPApache JServ ProtocolThe Apache JServ Protocol is a binary protocol that can proxy inbound requests from a web server through to an application server that sits behind the web server. It also supports some monitoring in that the web server can ping the application server...
) support (in versions 1.5.x and up) - HTTP compressionHttp compressionHTTP compression is a capability that can be built into web servers and web clients to make better use of available bandwidth , and provide faster transmission speeds between both...
using mod_compress and the newer mod_deflate (1.5.x) - Light-weight (less than 1 MBMegabyteThe megabyte is a multiple of the unit byte for digital information storage or transmission with two different values depending on context: bytes generally for computer memory; and one million bytes generally for computer storage. The IEEE Standards Board has decided that "Mega will mean 1 000...
) - Single-process design with only several threads. No processes or threads started per connection.
Limitations
Lighttpd officially does not support sending large files from CGI, FastCGI, or proxies unless X-Sendfile is used.Usage
Lighttpd is used by a number of high-traffic websites, among them MeeboMeebo
Meebo is a social platform connecting users with their friends across the web. It began in 2005 as a browser based instant messaging program which supported multiple IM services, including Yahoo! Messenger, Windows Live Messenger, AIM, ICQ, MySpaceIM, Facebook Chat, Google Talk, CafeMom and...
and YouTube
YouTube
YouTube is a video-sharing website, created by three former PayPal employees in February 2005, on which users can upload, view and share videos....
. Wikimedia runs Lighttpd servers
as does SourceForge
SourceForge.net
SourceForge is a web-based source code repository. It acts as a centralized location for software developers to control and manage open source software development. The website runs a version of SourceForge Enterprise Edition, forked from the last open-source version available...
.
Three of the most famous torrent listing websites, The Pirate Bay
The Pirate Bay
The Pirate Bay is a Swedish website which hosts magnet links and .torrent files, which allow users to share electronic files, including multimedia, computer games and software via BitTorrent...
, Mininova
Mininova
Mininova is a website offering BitTorrent downloads. Mininova was once one of the largest sites offering torrents of copyrighted material, but in November 2009, following legal action in the Dutch courts, the site operators deleted all torrent files uploaded by regular users including torrents that...
and isoHunt
IsoHunt
isoHunt is a BitTorrent index with over 1.7 million torrents in its database and 20 million peers from indexed torrents. With 7.4 million unique visitors , isoHunt is one of the most popular BitTorrent search engines. Thousands of torrents are added to and deleted from it every day. Users of...
, which have more than 1,000 hits per second, also use Lighttpd.
Lighttpd currently holds fifth place on the Netcraft
Netcraft
Netcraft is an Internet services company based in Bath, England.Netcraft provides web server and web hosting market-share analysis, including web server and operating system detection...
"Web Server Survey" (November 2010).
See also
- Comparison of web server softwareComparison of web server software-Overview:-Features:- Operating system support :...
- Traffic ServerTraffic ServerThe Apache Traffic Server is a modular, high-performance reverse proxy and forward proxy server, generally comparable to Nginx and Squid. It was created by Inktomi, and distributed as a commercial product called the Inktomi Traffic Server, before Inktomi was acquired by Yahoo!...
- Web acceleratorWeb acceleratorA web accelerator is a proxy server that reduces web site access times. They can be a self-contained hardware appliance or installable software....
which discusses host-based HTTP acceleration - Proxy serverProxy serverIn computer networks, a proxy server is a server that acts as an intermediary for requests from clients seeking resources from other servers. A client connects to the proxy server, requesting some service, such as a file, connection, web page, or other resource available from a different server...
which discusses client-side proxies - Reverse proxyReverse proxyIn computer networks, a reverse proxy is a type of proxy server that retrieves resources on behalf of a client from one or more servers. These resources are then returned to the client as though it originated from the reverse proxy itself...
which discusses origin-side proxies - Internet Cache ProtocolInternet Cache ProtocolThe Internet Cache Protocol is a protocol used for coordinating web caches. Its purpose is to find out the most appropriate location to retrieve a requested object from in the situation where multiple caches are in use at a single site...
External links
- Project Web site
- OpenVMS Lighttpd project
- [irc://irc.freenode.net/lighttpd #lighttpd] on freenodeFreenodefreenode, formerly known as Open Projects Network, is an IRC network used to discuss peer-directed projects. Their servers are all accessible from the domain name [irc://chat.freenode.net chat.freenode.net], which load balances connections by using the actual servers in rotation...
- Complete guide to setup your server with Lighttpd, PHP5, MySQL, e-mail, firewall etc.
- Running Django on Lighttpd via FastCGI
- Older Lighttpd for Windows builds
- Guide to setup Lighttpd MySQL Php Wordpress DNS Ubuntu from scratch on Rackspace Cloud instance
WLMP
- Lighty2Go Portable LightTPD, MySQL & PHP (LiMP) Project
- yPortableWS Portable WLMP Project (requires .NET Framework.NET FrameworkThe .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...
) - WLMP Project - lighttpd builds for Windows