RPi webserver

From eLinux.org
Revision as of 06:23, 15 April 2012 by Monpjc (talk | contribs)
Jump to: navigation, search


The board may not look that powerful but there is more than enough grunt to run a small web server supported by php and mysql. I have not covered this here but have also installed wordpress on the server and runs very well too.

This HOWTO is based on the Debian build and has been tested on the first and second release.

Please note you are required to check security setting and access to the server, this is a guide on getting to the first point of having a working server and first few pages.

Install Process

Installing Lighttpd

Lighttpd is one of the smallest web server around and ideal for the raspberry Pi as its uses very little memory.

First you need to set up a group and user that the web server can use:
sudo addgroup --system www-data
sudo adduser www-data www-data

Next run the install, this will take a few moments:
sudo apt-get install lighttpd
You can check that the server is installed correctly by typing:
ps -u www-data u

The main web server is now installed and can be checked by opening a browser and entering the address of your server and checking Lighttpd's default information page:
http://[your raspberry pi address]/index.lighttpd.html

NOTE: Your web sites files are located at /var/www/

However you will also need php and mysql to get the best out of a web site...