What is Web Server? How it Works?




What is WEB SERVER?


A Web server is a program that uses HTTP (Hypertext Transfer Protocol) to serve the files that form Web pages to users, in response to their requests, which are forwarded by their computers' HTTP clients. Dedicated computers and appliances may be referred to as Web servers as well.

The process is an example of the client/server model. All computers that host Web sites must have Web server programs. Leading Web servers include Apache (the most widely-installed Web server), Microsoft's Internet Information Server (IIS) and nginx (pronounced engine X) from NGNIX. Other Web servers include Novell's NetWare server, Google Web Server (GWS) and IBM's family of Domino servers.

Web servers often come as part of a larger package of Internet- and intranet-related programs for serving email, downloading requests for File Transfer Protocol (FTP) files, and building and publishing Web pages. Considerations in choosing a Web server include how well it works with the operating system and other servers, its ability to handle server-side programming, security characteristics, and  the particular publishing, search engine and site building tools that come with it.

HOW DOES IT WORK?


What happens when you enter in the address field of your browser the URL http://www.aprelium.com/doc/sample.html?

First, the browser slices the URL in 3 parts:

  1.    http://: This part indicates that the document you want to access can be retrieved from web server, which understands the HTTP protocol. The HTTP protocol is a standardized language of communication between browsers and web servers.

  2.    www.aprelium.com: This is the host name of the computer from which the document can be downloaded.

  3.    /doc/sample.html: This is the virtual path of the document in the www.aprelium.com's web server.

Then, the browser contacts a DNS (Domain Name Server) to know the IP address of the computer which full qualified domain name is www.aprelium.com. The domain name server is usually run by your ISP or by your company.

The browser establishes a connection channel with the web server on the computer which IP address was given by the DNS server and requests the document on the host which name is www.aprelium.com and which virtual path is doc/sample.html. The browser has to specify in the request the host name because many modern web servers (including Abyss Web Server) have the ability to serve more than a one host from a single computer with a single IP address only. This is called virtual hosting. In such a case, the IP address of this computer is associated with more than one domain name.

The server decodes the request and maps the virtual path to a real one, which should match an existing file. The server sends the file to the browser with some useful information such as its last modification time and its MIME type. The MIME type helps the browser decide how to display the received document. In our example, it is a HTML file. So the server sets its MIME type to text/html and the browser understands that it must render it as text.

Sometimes you enter a URL without an explicit filename such as http://www.aprelium.com/doc. The browser sends the request to the web server as in the previous example. The server detects that the virtual path maps to a directory and not to a file. It searches then in this directory an index file. Index files are usually named index.html or index.htm. If it finds for example index.html, it acts as if the requested URL was http://www.aprelium.com/doc/index.html. If no index file is found, the web server generates a listing of the directory contents and sends it to the browser or reports an error.

Thanks for reading...


REFERENCE

[1] http://whatis.techtarget.com/definition/Web-server
[2] https://aprelium.com/data/doc/2/abyssws-linux-doc-html/howdowswork.html

0 comments:

Post a Comment