Hosting Python web applications
As we discussed at the beginning of this chapter, in order to run a Python web application, we need a web server to host it. There are many web servers in existence today, and you will very likely have heard of several. Popular examples are Apache, nginx (pronounced engine-x), lhttpd (pronounced lighty), and Microsoft's Internet Information Services (IIS).
There is a lot of terminology around web servers and various mechanisms they can use to invoke Python web applications. We're going to take a very brief tour of the history of web applications to help explain some of these concepts.
CGI
In the early days of the Web, web servers would mostly only be required to send clients HTML pages, or the occasional image file. As in the earlier figure of a HTTP request journey, these static resources would live on the hard disk of the server, and the web server's main task would be to accept socket connections from clients, map the URL of a request to a local file, and...