Installing Lighttpd with PHP (PHP-FPM mode) and MySQL or MariaDB on Ubuntu 15.10

Lighttpd is a secure, fast and standards-compliant web server designed for speed-critical environments. This tutorial shows how to install Lighttpd on an Ubuntu 15.10 server with PHP support (through PHP-FPM) and MySQL or MariaDB. PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites. I use PHP-FPM in this tutorial instead of Lighttpd’s spawn-fcgi.