Install lighttpd webserver on raspberry pi

This quick guide will walk you through installing the lighttpd webserver on a raspberry Pi.

Update packages
sudo apt-get update

Install lighttpd
sudo apt-get install lighttpd

Once completed enter your pi’s ip address in a browser and if all has gone well your should see the holding page.

Now we will adjust some permissions to ensure the “Pi” user account can write files to the location where Lighttpd expects to find web pages. The /var/www directory is currently owned by the “root” user. So let’s make the “www-data” user and group the owner of the /var/www directory.
sudo chown -R www-data:www-data /var/www

Allow the “www-data” group permission to write to /var/www
sudo chmod 775 /var/www

Add the “Pi” user to the “www-data” group.
sudo usermod -a -G www-data pi

For permissions to take effect reboot te Pi
sudo reboot

You may also like

Leave a Reply

Your email address will not be published. Required fields are marked *