A web server can mean two things – a computer on which a web site is hosted and a program that runs on such a computer. So the term “web server” refers to both hardware and software. We’ll look at these two one by one.
But before that, here are few quick facts. The World Wide Web was invented by Sir Tim Berners-Lee who also created the world’s first web browser and the world’s first web server software. The world’s first server hardware was a NeXT computer at Sir Tim’s lab. NeXT was the company that Steve Jobs founded in 1985 after quitting Apple.
A web site is a collection of web pages which are digital files generally written using HyperText Markup Language (HTML). For a web site to be available to everyone in the world at all times, it need to be stored or “hosted” on a computer that is connected to the internet 24/7/365. Such a computer is known as a Web Server (note the first letter is in uppercase).
You can potentially host a web site on your home computer but this involves a lot of work and constant monitoring. It is easier to “buy” web hosting from a company because there are thousands that offer this service at reasonable prices. A brief on one of the best companies is at the end of the article – you can not only get web hosting but also a domain name and a web site really cheap!
There are several requirements for a Server computer – it needs to be fast, have a large storage capacity hard disk and lots of RAM. But the most important is having a permanent internet address also known as an I.P. (Internet protocol) address. If the I.P. address changes, the web site would not be found and will appear offline – the browser will display a cannot find web site error. For details, read differences between your home computer and a web Server.
A web server program is software that runs on the web site hosting Server computer. Its main purpose is serving web pages; which means it waits for requests from web browsers (also known as clients) and responds by sending the required data back. This client-server interaction is the hallmark of how the web works.
There are many web server programs available – check list of web servers. The most famous and popular of them all is Apache developed by the Apache Foundation. Not only is Apache free but it is also available for several operating systems including Windows, Macintosh and Linux/Unix. This web site has a detailed tutorial on how to install Apache on a Windows 7 computer.
FYI, differentiating the server program (software) and the Server computer (hardware) by the case of the first letter is suggested and followed only by purists – it is certainly not a rule! Generally, readers quickly understand from the context whether one is referring to the hardware or the software.
Web servers – the computer or the program – have a vital role on the Internet. The Server machine hosts (stores) the web site on its hard disk while the server program helps deliver the web pages and their associated files like images, flash movies etc. to clients (browsers).
The process of loading a web site/page in a web browser starts with the user either entering the URL in the address bar or clicking on a link. You should know that each web page has a unique address (or URL) on the internet; which means the same page cannot exist in two places. (If a copy does exist in another location, its address would be different from that of the original).
Once the appropriate action has been initiated by the user, the browser sends out a request for the web page. Behind the scenes, the URL of the requested web page is resolved into an I.P. address, which, in English, means, converted to an I.P. address – something that computers understand. The I.P. address points to the location of the web site host. The request is forwarded to Server computer and passed on to the server software.
The server software now gets to work and hunts for the requested web page on the hard disk. On finding the file, it sends a response to the browser followed the actual web page file which then starts displaying the page.
A typical web page not only has text but also embedded multimedia elements like images and Flash animation. These “extra” files are separate from the actual web page and are fetched by the browser from the Server one by one. Note (and an important one), ONLY the web browser determines how a web page is displayed; the web server has no control over this. The job of the web server ends once the requests from the browser are processed and the required information is sent.
Though it might seem that the request-and-response process takes a lot of time, especially when you consider that the client and server computers might be thousands of miles apart, it actually happens very fast. That’s because of the HyperText Transfer Protocol (HTTP) which is a set of rules developed by the “big lads” to facilitate the transfer of data over the internet.
As I mentioned before, there are hundreds, if not thousands, of companies providing web hosting service. The best one, in my opinion, is [affiliate link →] Network Solutions which was also the first company to sell domain names in the world. Not only are their prices very competitive, they provide great customer support and superb security features.
Based on my personal experience, [affiliate link →] Network Solutions is ideal for people new to the web who want to get started quickly. One can only get a domain name but also a web site (and, yes, your own web server space) and email service for a very reasonable price.
One final point (a question, actually): Do you think a computer can be both a web server and a client? Yes! If you install Apache on your local computer, it will work both as a Server and Client! As the next step, I suggest reading the differences between client-side and server-side programming languages to know more.
About 8 billion electrons are used for an average email of 50KB. If one were to weight all these, it turns out that the message weighs about "two ten thousandths of a quadrillionth of an ounce". [more...]