You are on page 1of 7

What is web server - a computer of a program?

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 each of
these individually.

The web server computer - the hardware


A web site is a collection of web pages which are digital files, typically 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 27/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.
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.

The web server program - the software


A web server program is software that runs on the web site hosting Server computer. Its main purpose
is to serve 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 the web!
There are many web server programs available- check list of web servers. The most famous and popular
of all web servers is Apache developed by the Apache Foundation. Not only is Apache free but it's also
available for several operating systems including Windows, Macintosh and Linux/Unix.
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 not a rule. Generally, readers quickly
understand from the context whether one is referring to the hardware or the software.

What is the role of web server on the Internet?


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 and flash movies.
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).
The browser now needs to send 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 and the request is forwarded to Server computer and passed on to the server software.
The server software now takes up and hunts for the requested web page on the hard disk. On finding the
file, it sends a response and the web page file to the browser 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 need to be sent one by one for the browser
to display the web page correctly. 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 a web server ends once it
processes the request from a browser and sends the required information.
Though the request-and-response process might seem to take 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.
One final point (a question, actually): Do you think a computer can be both a web server and a client? To
know more, read the differences between client-side and server-side programming languages.

Can I host my web site on my home/office computer?


That's an interesting question...
Let me first give you a quick answer before I bore you with details.
Yes, you CAN host a web site on your home/office computer.
And why do I think it is an interesting question? Because, unfailingly, at least one student from my
beginners class throws this at me and so I guess it's something that everyone wants to know. Also the
answer to this question helps us to know, in a little bit more detail, what web servers are and how they
work.
Let me rephrase the question - Why can't our home computers with broadband internet and 24/7
connectivity be used as web Servers and host web sites? Actually, our home computers CAN act like
web servers. Here are a few things we need:

A static I.P. (Internet protocol) address


24/7 Internet connectivity (a fast connection would definitely help)
Web server software
A stable and reliable operating system

Hosting your web site from your home/office computer


Typically, a web server is a powerful machine with a stable and reliable operating system and a 24/7
Internet connection. A web server also needs a static I.P. (Internet protocol) address so that the
location of the hosted web site/s does not change. In addition to the web server software (which serves
web pages), several other software that help in maintenance, enhancing functionality and securing the
machine from attacks from hackers need to be installed on the machine.

The need for a good operating system


Obviously, you need a stable and reliable operating system that can serve web pages quickly and not
crash or hang even under heavy traffic. Here are some other hallmarks of a good operating system for a
web server:

In-built security features to protect from hackers and virus attacks.


Easy of administration through shell environment or GUI-based software.
Scalability to up-gradations to ensure enhanced stability and security. Also, the process of
installation of updates should easy and as smooth as possible.
In-built necessary server software should be a part of the operating system else, they should be
available and installed quickly and smoothly.
Availability of third-party software - No operating system is perfect and complete. Third party
applications can provide additional security, better features and functionality.

With the above points in mind, the Linux operating system fits the bill pretty well - So does Windows,
actually, but you do need to be a little more experienced in server administration if you want to run a
Windows based web server.

Linux is also cheaper than Windows and has tons of free third-party software and applications that can
be smoothly integrated in the operating system to increase functionality and security. Linux, which is an
Open Source Software (OSS), works well with other OSS such as Apache (the most popular web server
software), MySQL (a good stable database application and server), PHP (server-side scripting
language) and has several in-built applications such as FTP (File Transfer Protocol), sendmail (SMTP
email server) etc.

The need for a static I.P. (Internet Protocol) address


Each computer connected to the Internet needs to have a unique number assigned to it so that it can be
identified and there are no conflicts with other computers. This unique number is the Internet Protocol
(I.P.) address. The I.P. address is just a series of four numbers each less than 255 and separated by dots
(periods). For example, 214.34.7.90 would be a valid I.P. address.
Since, for us humans, I.P. addresses are not as easy to remember, the "powers that be" created domain
names. However, each domain name is "tied up" or "associated" with an I.P. address. The domain
name and its corresponding I.P. address are stored on several different computers scattered around the
globe. These machines called Domain Name Servers help to resolve the domain name to its I.P.
address. In layman's language - when you type a domain name on your browser, it first checks with a
Name Server and gets the corresponding I.P. address (something that computers understand better than
us) and then loads the web site.
An I.P. address is the address of a computer on the internet - it specifies the location of a server that
hosts a web site. It follows that if the I.P. address changes, the web site will not be found if you try to
load it on a browser by typing its domain name.
Now, most of us use net connections on our home/office computers from the local Internet Service
Provider. These ISPs assigned our computers with a dynamic I.P. address each time we connect. Thus,
each time we disconnect and start the connection again, our computers are given a different I.P. address.
So if the I.P. address of your home/office computer changes, your web site will not load unless you go
and change the information on the Name Server. Obviously you cannot make these changes each time
your computer's I.P. address changes. For this reason, to host a web site on your home/office computer
you need a "static" I.P. address - an I.P. address that does not change.
The problem is that ISPs generally do not allow you to host a web site on your computer. And they do
this by allocating a new I.P. address each time you connect and also blocking required ports. Having said
that, you can get a static I.P. addresses by either upgrading your package (to something like a
"business package") or shift to an ISP that does provides one. The cost of a static I.P. can be an extra $30
to $50 per month (maybe even more). Check with your Internet Service Provider. This, in my opinion, is
just too much when web hosting companies offer feature-rich packages for as low as $10 per month.
Also check DynDNS.com if you want a static I.P. from a dynamic address. FYI, some ISPs would
actually fine you if you host a web site on their net connection.

The need for 24/7 connectivity to the Internet


A fast Internet connection is as important as a stable 24/7 connection. You would not like your web
site to download slowly would you? Any downtime in the net connection would result in your web site
being offline.

The need for Server software


According to Netcraft server statistics, Apache still is the most popular and widely used web server on
the net. Apache is an open source software (read free) that can be installed on various platforms
including Linux/Unix, Windows, Mac. For more details on Apache refer - What is Apache and what
does it do?.
You can also have a look at a detailed list of important web servers.
Its easy to install the Apache web server. In fact, most Linux versions come with an Apache server
already running or one that can be installed and configured in a few clicks.

The need configuring your computer for security and accessibility


If you plan to host a web site on your home/office you cannot leave it open to attacks by hackers. Also
you need to protect important directories - ones containing files of the operating system or other
programs that are critical for smooth and error-free running of the server. Your system has to be
configured properly to protect against accidental or intentional misuse.

The final conclusions


Hosting your web site on your home/office computer would be a great learning experience to all
adventurous people out there. For most of us, it's wiser and quicker to just go to a reliable hosting
company and pick up a web hosting package because these companies take care of maintaining the
server, the internet connection, server security and power backups.

What is Apache and should it be a part of my web hosting?


Apache is a web server developed by the Apache Software Foundation. It is the most popular web server
in the world according to the web server survey conducted by Netcraft. And the reasons of its popularity
are several. Apache is free and open source. It provides high security and is well suited for large and
small web sites alike. Apache can also run on a variety of operating systems including Unix, Linux,
FreeBSD, Windows, Mac OS X etc. Apache is HTTP/1.1 compliant, very powerful and flexible. The
web server, unlike many others that suffer burnouts, is being actively developed by a group of dedicated
programmers.
However, Apache comes with little support from the Apache Software Foundation. This does not mean
that you will not be assisted in times of trouble. There is more than enough support on web mailing lists
and forums.
Apache running on Linux/Unix or FreeBSD is known for high performance.

The ideal configuration for Apache(?)


Many developers believe that the best web server machine is one that runs Linux operating system, has
the Apache web server that supports PHP scripts and MySQL database server - fondly known as LAMP
(Linux - Apache - MySQL - PHP). The reason for this belief may lie in these four products being free.
However, I would like to think that it has more to do with supporting the open source community.
Further one is not confined to using products of only one company.
WAMP
XAMP

Running Apache web server on your local machines


If you plan to develop web sites in PHP or Perl, I would suggest you grab the latest copy of Apache and
install it on your computer. For example, I run the Apache server on my Windows XP machine to test
PHP and Perl scripts. Testing and correcting scripts on my local computer saves me time than trying to
work off the online server.
You can get the latest version of Apache HTTP web server from the download page.

How much of web hosting server hard-disk space


do I need for my site?
I got 100MB storage with my web hosting package - that was in 1999. The hard disk space offered by
web hosts has increased tremendously since those days. You can now get 100, 200, even 300 GB hosting
space for a much lesser price than what I had paid in 1999! Some companies like Hostgator are even
providing unlimited space.
Coming back to the question we were addressing - how much web space do you need for a web site?
Should you take a hosting package with 100GB space or one with 200GB space?
This depends on the kind of web site you want to develop. For example, if you envisage a web site with
lots of large files (such as music or video), you would definitely need larger web space than the average
web site. Let us now look at some figures.
A web page should ideally be less than 20kb, and that is only the HTML. If we include external
JavaScript file (average 2kb), external Cascading Style Sheets file (average 2kb), and embedded images
(not more than 50 kb), the total size of the web page becomes 74kb. And if your web site has a hundred
pages, it would require 7.5MB. So it hardly makes a difference if you take hosting with 100GB or
200GB - the question being, would you ever utilize all the space provided by your web host?
On the other hand, if you are planning to have downloadable music and video files which are generally
large files, I suggest that you work out an estimate size and procure hosting that has at least twice the
file size (to be prepared for the future).
That said, I think the space requirements of a typical company web site are very very small compared to
the web space offered by most web hosting companies today. And so the amount of hard disk space
offered in a hosting package should not affect your decision, unless, you plan to host a special kind of
web site that has very large video and music files.
FYI, the web space offered in a hosting package includes the space of databases and email accounts so
do not take hosting if the space offered is less than 50MB.
Finally, if you fall short, you can either purchase additional hard disk space from your web hosting
company or if that's proving expensive, change your web hosting

You might also like