Turn the Pi into a Web Server

Although the Pi looks like a toy compared to modern web server hardware, it’s still powerful enough to serve interesting information in your local network. Not only can it serve static websites, but it can also generate dynamic content using databases and web applications. In addition, it can even provide access to its GPIO ports via web technologies.

The first thing you need to turn the Pi into a web server is an HTTP server, a network service that understands the Hypertext Transfer Protocol (HTTP). You can choose from several great products, such as the Apache HTTP server[70] or Nginx,[71] but Lighttpd[72] is a good choice for the Pi because of its very low memory footprint.

Installing/running Lighttpd is ...

Get Raspberry Pi, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.