A Journey through the Web Stack

A technical journey through a common web stack including the HTTP 1.1 protocol, the Apache web server, CGI, PHP and the browser.

1 - Introduction

This article is intended to give an in-depth overview of the entire web stack and show the relationship and dependencies of each of the components on the others.

This article is written in the context of the LAMP stack (Apache and PHP have their own sections in this article) but most of the information relayed here is relevant to any technology used. Apache could be replaced with IIS with a minimum amount of rewriting, PHP could be replaced with Python.

Web Developers treat many parts of the web as a black box. Many front end developers consider the Apache web server a magic box that teleports their HTML, Javascript and CSS to the browser. PHP developers often don’t consider the repercussions of their work when rendered in the browser. Most developers of either persuasion are oblivious to the intricacies of the HTTP protocol which they depend on to transport their work to the end user.