Lighttpd – Lightweight Web Server

Lighttpd is a secure, fast, and flexible web server optimized for high-performance environments. With its...

Web Servers Linux Open Source
Download

Lighttpd is a secure, fast, and flexible web server optimized for high-performance environments. With its small memory footprint, it excels on embedded systems and high-traffic sites.

Key Features

  • Low Memory: Efficient resource usage
  • FastCGI: PHP and other language support
  • Virtual Hosts: Multiple site hosting
  • URL Rewriting: Flexible URL manipulation
  • SSL/TLS: Secure connections

Installation

Install Lighttpd on Ubuntu:

sudo apt update
sudo apt install lighttpd
sudo systemctl enable lighttpd
sudo systemctl start lighttpd

Usage Examples

Configure in /etc/lighttpd/lighttpd.conf:

server.document-root = "/var/www/html"
server.port = 80

# Enable modules
server.modules += ("mod_rewrite", "mod_fastcgi")

# PHP via FastCGI
fastcgi.server = (
    ".php" => ((
        "bin-path" => "/usr/bin/php-cgi",
        "socket" => "/tmp/php.socket"
    ))
)

# Virtual host
$HTTP["host"] == "example.com" {
    server.document-root = "/var/www/example"
}

Benefits

Lighttpd delivers web server performance with minimal resources. Its efficient architecture handles high concurrency on limited hardware.

Download Lighttpd

Was this article helpful?