About Lighttpd
Lighttpd (say lighty) is an event-driven web server released under the revised BSD license. It serves static files quickly, runs PHP and other languages through FastCGI or CGI, rewrites URLs, compresses output and proxies to backends, with TLS and HTTP/2 built in.
Its memory and CPU use stay low, which makes it a natural fit for the smallest CloudSat plans or a static site that should cost as little as possible to keep online.
After deploy the Ubuntu package is installed and running, serving the default page from /var/www/html on port 80.
What you get with Lighttpd
- Event-driven core with modest memory use
- FastCGI and CGI for PHP, Python and other languages
- URL rewriting, redirects, authentication and compression
- TLS and HTTP/2 support
- Reverse proxying with mod_proxy
Lighttpd use cases
- Static sites and documentation on the smallest plan
- PHP apps through FastCGI on little memory
- A tiny front end for an internal API
After you deploy Lighttpd
- With the server Running, the Lighttpd placeholder page should load at
http://<server IP>/. - SSH in as root and put your site in
/var/www/html, or changeserver.document-rootin/etc/lighttpd/lighttpd.conf. - Enable modules with
lighty-enable-mod(for PHP:fastcgiandfastcgi-php, withphp-cgiinstalled), then reload the service. - Add a TLS certificate and switch on the SSL module before serving a public domain.
Lighttpd ports
Open these in your firewall if you use one: 80/tcp HTTP, 443/tcp HTTPS.
Lighttpd FAQ
Lighttpd, Nginx or Caddy?
All three serve static files fast. Lighttpd has the smallest footprint, Nginx has the most examples online, and Caddy obtains certificates automatically.
Which plan is enough?
A static site runs comfortably on the smallest Cloud VPS, 512 MB at $1.98. Add memory when PHP or another FastCGI backend runs beside it.
Disclaimer. The Lighttpd project has no affiliation with CloudSat and does not endorse it. Names and logos belong to their owners and appear only to identify the software.