Sunday, November 18, 2012

How to install a web server on Raspberry Pi - Lighttpd


http://www.lighttpd.net/Lighttpd (http://www.lighttpd.net/) 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:
 /var/www"


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:
/etc/lighttpd/lighttpd.conf

The error log is:
/var/log/lighttpd/error.log

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.

3 comments:

  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…..

    ReplyDelete
  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.

    ReplyDelete