How does web server works ?
---------------------------------------
Web Server does nothing but listen to the IP addresses and TCP port or ports specified in its Config file. When a request appears on a valid port, it receives the HTTP request and analyzes the headers. It then applies the rules it finds in the Config file and takes the appropriate action.
URL stands for Universal Resource Locator. A URL such as
http://www.websphereusergroup.org comes in three parts:
method : // host / absolute path URL (apURL)
So, in our example, < method> is http, meaning that the browser should use HTTP (Hypertext Transfer Protocol); is www.websphereusergroup.org; and is "/ ", meaning the top directory of the host. Using HTTP/1.1, your browser might send the following request:
GET / HTTP/1.1
Host: www.websphereusergroup.org
The request arrives at port 80 (the default HTTP port) on the host www.websphereusergroup.org. The message is again in three parts: a method (an HTTP method, not a URL method), that in this case is GET, but could equally be PUT, POST, DELETE, or CONNECT; the Uniform Resource Identifier (URI) "/"; and the version of the protocol we are using. It is then up to the web server running on that host to make something of this message.