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 linux server.
Lighttpd is available to install from the official Ubuntu repositories, So if you want to install Lighttpd, you only have to run this command.
sudo apt-get install lighttpd
Installing PHP5 and modules
Ubuntu provides a FastCGI-enabled PHP5 package. We can install by issuing the following command.
sudo apt-get install php5-cgi php5-mysql
Enable fast-cgi support.
sudo lighttpd-enable-mod fastcgi sudo lighttpd-enable-mod fastcgi-php
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:
http://localhost/ or http://your.ip.addr.ess
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.