Web servers dish out billions of web pages a day. They tell you the weather, load up your online shopping carts, and let you find long-lost high-school buddies. Web servers are the workhorses of the World Wide Web. In this chapter, we:
Survey the many different types of software and hardware web servers.
Describe how to write a simple diagnostic web server in Perl.
Explain how web servers process HTTP transactions, step by step.
Where it helps to make things concrete, our examples use the Apache web server and its configuration options.
A web server processes HTTP requests and serves responses. The term "web server" can refer either to web server software or to the particular device or computer dedicated to serving the web pages.
Web servers comes in all flavors, shapes, and sizes. There are trivial 10-line Perl script web servers, 50-MB secure commerce engines, and tiny servers-on-a-card. But whatever the functional differences, all web servers receive HTTP requests for resources and serve content back to the clients (look back to Figure 1-5).
Web servers implement HTTP and the related TCP connection handling. They also manage the resources served by the web server and provide administrative features to configure, control, and enhance the web server.
The web server logic implements the HTTP protocol, manages web resources, and provides web server administrative capabilities. The web server logic ...