lighttpd is an open-source web server for serving websites, static files, and web applications on Linux and other Unix-like systems. Pronounced "lighty," it focuses on efficient use of memory and CPU, with modules for connecting application backends, controlling access, and handling common hosting tasks.
It is worth considering for a small Linux server, a dedicated file-serving role, or a site that uses FastCGI applications. Its practical appeal is the ability to combine file hosting and application routing in one server while enabling the modules a deployment needs. Actual resource use depends on the configuration, traffic, and applications behind it.
Main capabilities
- Static file hosting: Serve HTML, images, stylesheets, and other website assets directly. Virtual hosting lets one server handle multiple sites.
- Dynamic applications: FastCGI, SCGI, and CGI support connect requests to external programs. For PHP deployments, the project recommends PHP-FPM to manage the PHP backend.
- Reverse proxying: Forward HTTP requests to a separate application server with mod_proxy, keeping the public web endpoint separate from application processes.
- Access control: Authentication and access modules help restrict protected resources. Module ordering matters because access checks need to run before application handlers.
- URL handling: Rewrites and redirects map incoming addresses to application routes or send visitors to a different URL.
- Compression and HTTPS: Output compression can reduce transferred response data, while TLS modules provide encrypted connections when configured with suitable certificates.
Running lighttpd on Linux
Configuration uses text files and loadable modules. Check which modules your installation includes, enable the ones required by the site, and follow the project's configuration guidance. A FastCGI application or proxied service remains a separate component with its own configuration and resource requirements.
Strengths and things to consider
lighttpd offers a focused combination of file serving, application interfaces, and modular request handling under the revised BSD license. It suits administrators comfortable maintaining server configuration and coordinating any application backends.
The configuration deserves care: the project documents cases where loading authentication after an application module can bypass the intended checks. Its efficient design also does not establish that it will outperform another server for a particular workload; compare using your site's traffic and configuration.
Alternatives to lighttpd
NGINX is worth comparing when reverse proxying, content caching, and load balancing are central to the deployment.
Apache HTTP Server (httpd) is relevant when a site depends on Apache modules or per-directory .htaccess configuration.
Caddy is an option when automatic certificate issuance, renewal, and HTTPS redirects would simplify routine administration.




No comment yet
Be the first to share your thoughts.