What is a web server?
Do you know how a web page is appearing in your browser when you open it in a browser? Do you know from where the images or audio has been appearing in any web page? They are all from some web servers. A Web server is a piece of computer software that can respond to a browser’s request for a page, and deliver the page to the Web browser through the Internet. When you call a web page by its address, the URL, for example, https://www.macronimous.com/, then what happens exactly between your computer and the web server where the site is hosted? Let us discuss everything you want to know about a web server in this article.
The Browser – web server communication
- If you call the URL(Uniform Resource Locator) https://www.macronimous.com/ in your browser, the browser will split-up and understand the three parts,
- The HTTP (Hyper Text Transfer Protocol),
- The server name where the site is hosted and
- The web page under the site, index.php.
- The browser will communicate with a name server to translate the server name “www.macronimous.com” into an IP (Internet Protocol) Address, which it uses to connect to the server machine.
- Then the browser will form a connection to the server at that IP address on port 80.
- By following the HTTP protocol, the browser sent a GET request to the server, asking for the file “https://www.macronimous.com/index.php”.
- Since the browser can understand only HTML Tags, the web server will interpret the server-side scripting and will send the files in HTML format to the Browser. For example, An Apache web server can interpret PHP scripting and will send the browser as an HTML file.
- Then the browser will interpret the HTML tags into formatted web pages, as you see in the browser.
Static and Dynamic pages
Web Server helps people to create both static and dynamic pages. All HTML pages(with or without client-side scripts) are static, means, the HTML files will be sent to the browser without any intervention of the web server. But when you write some server-side script that can make the site dynamic, here the presence of web server helps us to achieve the dynamic page. For example, if you write a GuestBook in ASP then a web server, here IIS, is needed to interpret it. The Web server is actually processing information and generating a page based on the specifics of the query.
What else a web server can do?
A web server can provide security to your pages to some level. A web server with SSL (Secure Socket Layer) can give you more protected pages, where you can do secured file transaction like credit card processing. As we previously said web servers can run your server-side scripting. Here is the list of some web servers and what server-side scripts they can run.
Apache – PHP, CGI/Perl, Python
Tomcat – CGI/Perl, JSP,Servlets, JavaBeans
iPlanet – JSP, Servlets, Enterprise JavaBeans
Chilisoft – ASP
Go web server – LotusScript
The following is the complete web comparison chart, tells about the platforms which they run and their cost.
Web Server Comparison Chart
|
Note: The above table is prepared with the prices, specified in the corresponding websites on December 2002.