Showing posts with label URL and Port. Show all posts
Showing posts with label URL and Port. Show all posts

Friday, October 16, 2009

URL and Port

URL

Uniform Resource Locator - It is the unique address of each resource on the web.
It is in the format:

protocol:// server : port/path of the resource/resource name/[optional query string]

eg: http://www.freshfruits.com/all/fruits/grapes.jsp

Protocol (http):- tells the server which communication protocol is used
Server (www.freshfruits.com) :- the unique name of server which maps to a unique IP address.
IP address is numeric.
Port (80):- port number is optional. By default the port number for web server is 80
.
Path (all/fruits/) :- the location of the resource in the server
(unix syntax is used to describe the path)
Resource name (grapes.jsp) :- the requested resource
Optional query string:- the extra info in the GET request is appended to the end of URL as query string.
It starts with ? followed by name/value pair separated by &


TCP Port

A 16 bit number that identifies a specific softare program on the server hardware. It is a logical
connection to a software running on a server harware. A server has 65536 ports ranging from 0 - 65535.
The port numbers from 0-1023 are reserverd for system services.
It is possible to run different applications on the same port provided the applications are using different
protocols.
Some reserved ports:
21 - FTP
23 - Telnet
25 - SMTP
37 - Time
80 - HTTP
110 - POP3
443- HTTPS
Apache (the open source web server )directory structure:
Apache_home -> htdocs -> index.html, root folders for the apps on the server -> sub folders and htm pages

Followers