Sunday, November 18, 2012

How to install a web server on Raspberry Pi - Lighttpd ( is an open source webserver which has reputation of being very light. Therefore it looks perfect for an Raspberry Pi. Here are the commands I used to install it

Lighttpd installation
sudo apt-get install lighttpd

The directory containing the web pages is:

The "pi" user does not have write permission to this directory.
You can give these rights with the following set of commands:

sudo chown www-data:www-data /var/www (to make the www-data owner of the directory)

sudo chmod 777 /var/www (to have full right to this directory)
sudo usermod -a -G www-data pi (to had the pi user to the www-data group)

You can now had your html file to the "/var/www" directory.

The configuration file is:

The error log is:

The command to restart the server:
sudo /etc/init.d/lighttpd restart

The command to reload the configuration
sudo service lighttpd force-reload

The server is ready. It is possible to use PHP and other services with Lighttpd, but I didn't do it so I can't explain it here.


  1. The service promises to offer a wide spectrum of hosting solutions characterized by cutting-edge tech innovations, great developer features, superior performance and reliable client support. Compared to other popular web hosting service providers I have used in the past, Bit Pak almost perfect average uptime sets it apart as it is well over the current industry standards…..

  2. Additionally, they provide free domains, free webmail, easy installation, free site builders, and a vast technical suite of tools. No coding experience is required, although they do provide an option to write your own code, making it completely customizable here.

  3. These guys are the most useful. Really friendly, excellent, they're among the best offers for any MacBook LCD repair. I experienced really made welcome and they could get the job done quickly. I know I'm defiantly returning these are the Visit men for Laptop repair