What is a WebServer ?
Now lets us know what is a web server, it is a software which serves websites on the internet, to achieve a particular goal it acts as a middleman between the server and the client. Servers are huge computers that store large amount of data and are accessible by many users at a time. Web servers store, process and provide the webpages that are requested by the user. For e.g.: A user has a computer connected to internet, types www.h2kinfosys.com in the web browser like Internet explorer, firefox, chrome etc. The web server takes the request and process it by displaying the web page of h2kinfosys.com.
For huge software, the organization can have their own web servers, which is maintained by their own IT team or the task is given to some IT company. For simple web application, for e.g. a marketing website of a small business, a third party web server services can be purchased. We consider to examples of web servers: Apache Webserver, IIS.
Apache Web servers:
It is an open source of free software which gives powers many websites. Its official name is Apache HTTP Server which is maintained by Apache foundation. Its main job is serving the website owners, the content of the websites. It is very old and reliable web server.
As we call Apache webserver, it is not a physical server but rather software that runs on a server. Its job is to create a connection between the server and the browsers when visitors visit the websites while delivering files back and forth. Apache is customisable software. As it has a module based structure, these allow server administrators to turn additional functionalities on/off. Apache has various modules which include security modules, caching, URL re-writing, password authentication and more.
Some common features in Apache include .htaccess, IPV6, FTP, HTTP/2, perl/Lua, WebDav, Load balancing, URL rewriting, session tracking. An Apache webserver can host multiple websites on the same server without separating the server machine and apache software for each websites. This concept is called as Virtual Host or VHost.
There are two types of Apache Virtual Host:
- Name-Based Virtual – Host
- Address-based virtual – Host
Name based virtual host is used to host multiple virtual sites in one IP address. By setting the IP address on apache requests of desired websites are received. IP or address based virtual hosting we need to set more IP addresses configured on the server. If the server has 10 IP addresses then 10 virtual hosts can be created. Apache webserver is widely used by web hosting companies for the purpose of providing virtual hosting. Apache machine differentiates between different hosts and reside on the same machine.
IIS Web servers:
IIS means Internet Information Services, which runs on the Microsoft .Net platform on the windows OS. While it is possible to run IIS on Linux and Macs using Mono, this is considered as unstable. The internet cannot survive without webservers. Webserver is process of hosting web applications. This allows to process messages that arrive through particular TCP ports.
The two main processes of handling the web requests are : either handle by single thread or to spawn a new thread for each request. The thread per request model of which that IIS uses will grab a thread from a thread pool for each request.
IIS is rich in features. IIS is used to host ASP.Net web applications and static websites. It can also be used as an FTP Server and extended to host web applications built on different platforms.
There are many built in authentication options such as Basic, ASP.Net and windows authentication. One of the key features of IIS is the application pool. An invaluable feature is remote management. IIS can be managed via the CLI using power Shell. IIS works through a various standard languages and protocols. HTML is to create different elements like text, buttons, and image placements, direct interactions and hyperlinks. Developers can create IIS websites with a number of tools, including WebDAV which can create and publish web content.
The Differences between Apache and IIS are:
- IIS comes as a package with windows and apache is an open software.
- While IIS runs only on the windows, Apache can run on different OS.
- IIS integrates with other Microsoft programs like .Net and ASP scripting language.
- IIS has help desk to handle most of the issues while support for the apache comes from the user community.
- The security features of IIS makes it safer than Apache.