Difference between revisions of "RPi webserver"

From eLinux.org
Jump to: navigation, search
Line 10: Line 10:
 
== Install Process ==
 
== Install Process ==
 
=== Installing Lighttpd ===
 
=== Installing Lighttpd ===
Lighttpd is one of the smallest webserver
+
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:<br>
 +
<code>
 +
sudo addgroup --system www-data<br>
 +
sudo adduser www-data www-data
 +
</code><br>
 +
Next run the install, this will take a few moments:<br>
 +
<code>
 +
sudo apt-get install lighttpd
 +
</code><br>
 +
You can check that the server is installed correctly by typing:<br>
 +
<code>ps -u www-data u</code><br>
 +
 
 +
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:<br>
 +
<code>http://[your raspberry pi address]/index.lighttpd.html</code>
 +
 
 +
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...

Revision as of 13:23, 15 April 2012

Introduction

THIS PAGE IS WORK IN PROGRESS
EDITOR MONPJC
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...