Sunday, June 2, 2013

Setting up a Webserver on the Raspberry Pi

Why set up a web server?

If you only remote the Raspberry Pi, you'll want a way to access files, logs, web cam images/video... you can set up a web server and then access these files from a web browser.

How to set it up

If you have your Raspberry Pi set up then just simply run:
sudo apt-get install apache2 php5 libapache2-mod-php5

That will set up everything you need.

File Structure

The location of your files that go to the public are in:
/var/www

You can make directories under /www/* and /or drop files there, and you'll be able to simply point your browser to your IP address of your Pi and you'll see the files. I.e. if you run "motion" you can configure motion to drop all the jpg's and video to a sub folder under /www.


No comments:

Post a Comment