A Web Server Primer

Introduction

Chances are, if you are reading this, you will have a good idea of what the World Wide Web (WWW or just Web) looks like; you have already used a browser to "surf the web". If you want to run a web server, however, you must also understand how the Web works. This section outlines some basic concepts that will help you understand the features of OmniHTTPd. Experienced users may skip this section.

The Web Surfer's View

From the web surfer's view of the world, the Web/Internet is a seamless flow of information. When the web surfer types in an address or clicks a link, the browser retrieves the information from the Web. As far the surfer is concerned, the Web is a shapeless glob of information that exists out there somewhere. The surfer does not need to know how it works to use it. All the surfer needs to do is read the web pages and decide where to go next by clicking on links and typing some occasional words.

The Web Admin's View

From the web administrator's view of the world, which you should now be adopting, the Internet is a complex set of interlinked computers that provide and request services from each other using a standard protocol, called TCP/IP. Each computer is identified by a unique numerical address, called the IP address or IP.

The Web happens to be one of the many services that are provided by these computers. The technical name for the Web service is HTTP or HyperText Transfer Protocol. Other services that exist on the Internet are FTP, gopher, DNS and RealAudio.

When a user requests information from the Web, the browser finds out which computer has the information and sends a request to it. The computer that has the information understands and receives the request and sends a response back to the browser. This relationship between the browser and the program on the other computer is called a client/server relationship. The browser is the client and the other computer is the server. The client or browser is requesting services from the server, which happens to be the other computer. A server that understands and responds to requests from a web browser is called a web server.

One of the important things to understand is that almost any computer can become a web server. Contrary to what a lot of expensive server vendors want you to think, it doesn't take any special hardware, software or connection to build and run a web server. All you have to do is have a computer that is connected directly to the Internet. Once a computer is connected, it can receive web requests.

The Domain Name System (DNS)

An important service that the Web relies on for operation is the Domain Name System or DNS. The DNS is a directory service that translates names into IP addresses. For example, if you type

http://www.omnicron.ab.ca

into your browser, it must find out where the information is located so that it knows where to send the request. The browser does this by requesting the IP address for www.omnicron.ab.ca from its assigned DNS server. When the DNS server responds with the answer, 208.176.63.140, the browser proceeds to open a connection to that address and send the request. The computer on the other end receives this request and sends the appropriate information back to the browser.

Static and Dynamic IP Addresses

Simply stated, a dynamic IP address is an IP address that changes while a static IP address is one that doesn't. Modem dialups and home cable connections usually have dynamic IP addresses. Most business-grade dedicated connections have static IP addresses.

TCP/IP Ports

A single computer will frequently be able to respond to a plethora of services. For example, the same computer might be running an FTP server and an HTTP (Web) server at the same time. This would mean that it could respond to FTP requests and HTTP requests. When the computer receives a request, how does it know whether it is an FTP request or an HTTP request?

Copyright 2000 Omnicron Technologies Corporation