Installing a web server (Apache, lighttpd, Nginx)

This recipe installs the Apache HTTP web server. Installation differences for the lighttpd and Nginx web servers are found at the end of this recipe.

The Apache web server is one of the most commonly used web servers on GNU Linux platforms like the Raspbian Linux distribution used by the Raspberry Pi. Apache is a mature, extensible web server that can be used to host a variety of applications; proxy access to websites internal and external; as well as host static web pages and images.

After completing this recipe, the Raspberry Pi will able to serve static and dynamic web pages from the SD card boot disk and from an external disk.

Getting ready

Ingredients:

An Initial Setup or Basic Networking setup ...

Get Raspberry Pi Networking Cookbook - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.