Lesson 29

Web Servers

Up until this point in the book, you have been opening web pages in the browser directly from the file system. Obviously, if you intend your web pages to be viewed by others, you need to make them available over a network. The software used for exposing web pages over a network is a web server.

The term “web server” can either denote the hardware of the underlying server or the software running on that server. For the purposes of this lesson, the term “web server” will be used to denote the software, whereas “server” will be used to denote the hardware this software runs on.

The primary purpose of a web server is to expose a set of resources from the file system of a network enabled server via protocols such as HTTP and HTTPS. Resources are typically files such as HTML pages, images, and CSS files, to video and audio files.

In this lesson, you will migrate the web application developed so far to a web server. You are doing this for two main reasons:

  • To give you an understanding of how a web server works: Any web page or web ­application you develop will be uploaded eventually to a web server, so it is useful to gain some understanding of how they work, and how to configure one.
  • Many of the APIs introduced in this section ...

Get HTML5, JavaScript, and jQuery 24-Hour Trainer 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.