Web Hosting Overview
by Jimmy Martin
First of all, let's look at what goes on in a web server. Like the computer you're using right now, the server has memory, disk drives and an operating system. For our example we'll look at Linux, one of the most common operating systems used in personal and small business web servers. The Linux kernel can be thought of as a supervisor program. When the other programs running on the server want to do something such as read a file from the hard disk, they ask the kernel to do it for them. The kernel is in charge of allocating all memory, hard disk space and network access.
You might think, "Why not cut out the middleman and save some time?" The reason is that the programs don't have to worry about what type of hard disk or network card the computer has, the Linux kernel takes care of all that for them.
A web server needs a program that can accept requests for a web page, find the correct page and send it across the internet to the person who requested it. The most common web server program used on Linux is called Apache. Like the Linux operating system, Apache is free of charge, which is one reason why it is so popular. It is also known for good performance and security.
Figure 1: Overview of a web server
Figure 1 (above) is a diagram of a typical web server. It shows that the Linux kernel accesses the memory and hard disk drives, and supervises the other programs. The diagram also shows the Apache web server program can receive requests and send pages across the internet. You will notice that there are two more programs running on the server along with Apache. These are PHP and MySQL.
A webserver usually has a programming language available to create "dynamic" web pages. A dynamic web page is one that can change automatically, for instance a page can be made to say either "Good morning" or "Good afternoon" depending on the time. Dynamic pages often change depending on the contents of a database. Figure 1 shows PHP as the available programming language. PHP is common because it is free and easy to learn. Alternatives include Perl, Python and Ruby.
Finally, most web servers have a database program available. MySQL is the most common free database used on personal and small business web servers, and is also used by some very large businesses. A database can be used to store anything from images to entire web pages. Databases are often used to store stock levels in online shopping websites. When combined with a programming language like PHP, a web page can be automatically changed to reflect whether or not an item is in stock.
Next, we will look at shared web hosting.