Why do you need a web server?

Answer:

First of all, in a simple term, to answer any your queries/requests made by user through the web. Hence, the name 'Web Server'.

A 'Server' is an application which is made available to listen to any request. A Server has the information. A Client is anyone who is in need of an information.

When you say, you make a request via web (or over web), that means, through the WWW which is predominantly through HTTP. HTTP Stands for Hyper Text Transfer Protocol which defines the set of rules to be followed during the transcation over web.

In an Web or Enterprise Application perspective, you need a webserver as a first entry point since all the requests have to be originated from a single place. Say, your login page to the application. But processing the login operation may not be the job of a Web Server and it would be done by a Web Application.

As such, a Web Server is preferred to serve any static files, which is not changing in nature for any type of requests. Whereas, you need a Web application to produce a dynamic response according to the type of inputs you provide along with your request.

In this scenario, to regulate all your traffic of requests, you need a single point of control, which is your webserver.

Cheers, Raghavan alias Saravanan M.