The Rasp Pi serves up a tempting web server

Website Maintenance

Now that your website is functional, the object is to keep it up and running. With a home server, the main change to the Raspberry Pi is to connect it to the router via a static IP (not DHCP).

If you are connecting with DHCP and you need to reboot the router, you could easily end up forwarding the wrong device on the local network. With devices like game boxes, home PCs, laptops, and phones all connected via DHCP with varying connection schedules, you will want the router to reserve a static IP for the Raspberry Pi.

Besides reserving the IP with your router, you can set up a static IP with your Rasp Pi (Figure 5):

# cd /etc/network
# nano interfaces

Remember to restart Apache.

Figure 5: Reserving a static IP address.

Various methods can tell you whether your Rasp Pi server is up and running. One method is a simple ping from another Linux machine connected to Internet. If the ping is unsuccessful, you can send yourself a text or email that lets you know you should reboot. If you run an SSH app on your phone, you can easily manage your Rasp Pi server from there.


Web cams and other hardware can connect to the Raspberry Pi, so you might want to create a password to protect directories and file(s) that you can then examine at your leisure. Using your Rasp Pi server for home security is another possibility. You could even add an antenna to the Rasp Pi and play a message over the radio if an invader enters your home – like, "Get out, I'm calling the police!"

When you add hardware to a Rasp Pi (via the GPIO and ports), you can do whatever you want with the data from a script or Linux package.

Buy this article as PDF

Express-Checkout as PDF

Pages: 8

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content