WEB SERVER!
A Web Server is a special software, which usually runs on a remote machine and responds to client requests by providing resources like HTML documents. Requests are made by the client, which is a browser running on a local machine, using the address typed by the user (called Uniform Resource Locator – URL). The web server maps the URL to a file on the server (or to a file on the server’s network) and returns the result in the form of HTML document to the client.
During interaction, the web server and the client communicate using Hyper Text Transfer Protocol (HTTP). HTTP is platform independent protocol used for transferring requests and responses between a client and a server over the Internet. There are two most common HTTP request types (methods): Get and Post. Using get and post, we can send and receive data from a web server. Among the two, the get request is for retrieving some static web page (stored in .html files) from the web server, whereas the post request retrieves a dynamic web page from the web server (by running a file such as .asp file).
A web server is a computer program that is responsible for accepting HTTP requests from clients (known as web browsers), and serving them HTTP responses along with optional data contents, which usually are web pages such as HTML documents and linked objects (images etc.).
HTTP Request Types:
The HTTP Request types – get and post - send form data to a web server and also request for the appropriate resource from the server. Though they work similarly, they differ in the way they send form data to a web server.
A get request sends form content as part of the URL. For e.g.,
is a get request that sends username and password as parameter strings with the URL mail.yahoo.com. In this request, the information following the symbol ? (username=david@password=xyz) indicates the user-specified input.
Get HTTP | Post HTTP |
Used to get static web pages from the Server. | Used to get dynamic web pages with the help of server-side scripting. |
Sends form data as a query string followed by ? in the URL | Sends form data as such in a form object that could be retrieved through Form collection in the Response object. |
Limits the user query to 1024 characters. | No limitation of user input in the form. |
Caches the web pages sent in response to the get request from the server. | Server’s response to the post request in the form of a web page is not cached. |
Table: Difference between the use of Get and Post request
A get request limits the user query to 1024 characters. If it exceeds this limit, the post request is used. The HTTP post request often post data to a server-side form handler, which is often an .asp file that fetches the data from a database residing at the server. The data are processed by the script to generate a HTML file that host the data. The HTML file is then sent back to the client as a response to the post request, which will be displayed in the web server.
Browsers often cache (save on a local disk) web pages for quick reloading to reduce the amount of data that the browser needs to download. However, browser typically doesn't cache the server's response to a post request, because the next post request may not contain the same information.
Apache Web Server:
Apache is server software which runs on platforms like UNIX, Linux and Windows. It is an open source product developed and maintained by the Apache Software Foundation. This is the most popular web server because of its stability, efficiency and portability.
The Apache Web Server is modular. There is a core Apache that deals with requests for files, HTTP content negotiation, debugging and tracing. Some modules are incorporated by default; other modules are only added on request. Such extension modules include the following:
1. Modules with Perl and PHP interpreters
2. The module for Source and Socket Layer (SSL) communications
Select the modules that are required and then build the Apache Server during installation.
The Apache web server is scalable. That means, it can run on computers ranging from PC to Mid-range and Mainframe computers. It can be configured to run on a typical home/office PC, on a multi-CPU Server and on an IBM’s Server computer. Moreover, Apache deals with the full HTTP protocol. It can handle content negotiation and authorization.
Apache’s Core Functionalities:
The Apache server has a relatively small core that can handle HTTP ‘Get’ requests for static pages and modules that provide all the other services of a full
HTTP-complaint server. The default configuration for an Apache server incorporates the modules for the following:
HTTP-complaint server. The default configuration for an Apache server incorporates the modules for the following:
1. Dynamic pages (CGI & SSI)
2. Controlled access to resources
3. Content negotiation
The Windows version of Apache has a large fixed part that incorporates many of the standard modules; the remaining modules are available as DLLs.A Video on Accessing the Web Server over the Internet!