Web Technologies - Old Questions

4.  Explain the uses of a web server.

5 marks | Asked in 2069

Web server is a program or a computer that can provide services to other programs called clients. A web server can contain one or more websites. A web server processes the incoming requests.

  • The primary function of web server is to store, process and deliver web pages to clients. The communication between client and server takes place using the HTTP. Pages delivered are most frequently HTML documents, which ,may include images, style sheets.
  • A web browser initiates the communication by making a request for a specific resources using HTTP and the server responds with the content of that resources or an error message if unable to do so.

Web server features:

  • Always wait for a request from a client;
  • Serves clients’ requests, then responds with the requested data to clients;
  • A server can communicate with other servers in order to meet a client’s request.

Basic functionality:

  • It receives HTTP request via TCP
  • It maps Host header to specific virtual host (one of many host names sharing an IP address)
  • It maps Request-URI to specific resource associated with the virtual host

                - File: Return file in HTTP response

                - Program: Run program and return output in HTTP response

  • It maps type of resource to appropriate MIME type and use to set Content-Type header in HTTP response
  • It Logs information about the request and response
  • All e-commerce site require basic Web server software to answer requests from customers like ; Apache ,Microsoft’s Internet Information Server (IIS)