How To Install Lighttpd on Ubuntu 16.04

September 24, 2016

How To Install Lighttpd on Ubuntu 16.04

Lighttpd is an open source web server that powers numerous websites in the world that focuses on increased performance and a light memory footprint. Together with the very popular MySQL database server and the PHP server side dynamic scripting language, Lighttpd is a strong alternative to the more resource intensive, but otherwise very powerful, LAMP stack.

This tutorial will show you how to install Lighttpd in order to quickly get you up and running with your cloud server.

Installing Lighttpd

Lighttpd is available to install from the official Ubuntu repositories, So if you want to install Lighttpd, you only have to run this command.

Installing PHP5 and modules

Ubuntu provides a FastCGI-enabled PHP5 package. We can install by issuing the following command.

Enable fast-cgi support.

Start Lighttpd server

Testing Lighttpd webserver

To make sure everything installed correctly we will now test Lighttpd to ensure it is working properly. Open up any web browser and then enter the following into the web address:

Note: Lighttpd’s default document root is /var/www on Ubuntu, and the configuration file is /etc/lighttpd/lighttpd.conf. Additional configurations are stored in files in the /etc/lighttpd/conf-available.

Congratulation’s! You have successfully installed Lighttpd.