sudo apt-get update && apt-get upgrade
sudo apt-get install lighttpd
Make the www-data user (and group) the owner of /var/www
sudo chown www-data:www-data /var/www
Change permissions on /var/www
sudo chmod 775 /var/www
Add pi user to the www-data group
sudo usermod -a -G www-data pi
Restart Server
sudo service lighttpd force-reload