docs.roxen.comView this page in a printer friendly mode
DocsRoxen2.1Administrator ManualPort System
Copyright © 2001, Roxen Internet Software
Suggestions, comments & compliments
manuals@roxen.com
 DEMO  DOCS  PIKE
 COMMUNITY  DOWNLOAD
www.roxen.com

   


Port System

Ports tab

Each site is available to the world on one or several URLs. The Port system, available under the Ports tab, handles the particulars of making the URL available. Each port handles one or several URLs. Ports are created automatically for the URLs. Sometimes no configuration is necessary at all, since Roxen tries to find out all information necessary to create a suitable port. However it is not always as simple. But to understand how a port is created we need to go describe how a resource is made available to computers on the Internet.

Protocols and the Internet

The protocol is the language that the computers talk to understand each other. Many different protocols are in use on the Internet, and at the bottom of practically all of them is the Internet Protocol (IP). On top of IP is TCP/IP and UDP/IP. UDP/IP is used for such services as the Network File System (NFS) and the Domain Name System (DNS), but most of the interesting protocols as far as Web servers are concerned are built on top of TCP/IP (or just `TCP', for short).

TCP is oriented in terms of connections between sockets. A socket is identified by two things: its IP adress, and its port number. A connection is identified by the the two sockets it connects. In the normal case, one end of the connection is a server socket, and the other end a client socket. The port number at the server socket typically indicates which protocol (built on top of TCP/IP) that is in use on the connection. The port number at the client socket is used to tell different connections to the same remote service apart, and is of no particular significiance to an application programmer or a web user.

The most central protocol for typical web traffic is the Hyper-Text Transfer Protocol (HTTP), closely followed by the encrypted version of the same thing (HTTPS). Roxen supports these two protocols directly for accessing web pages. A third option available is the traditional File Transfer Protocol (FTP). The standard port numbers used for these protocols are 80 for HTTP, 443 for HTTPS and 21 for FTP.

Numeric vs Symbolic Addresses

IP addresses are 32-bit numbers, often written in the form of four 8-bit components with periods between them, e.g. `127.0.0.1'. Since these names aren't always very easy to remember, a special network service known as the Domain Name System (DNS) allows translation more user-friendly names (such as `www.roxen.com') to the real, numeric address, so the friendlier names can be used when typing addresses.

The DNS approach gives the added bonus of being able to give several names to the same numeric address. The HTTP protocol takes advantage of this feature to allow several different virtual servers using the same port on the same machine by including a special `Host:' header whenever a document is requested through the HTTP protocol connection. This is commonly referred to as `virtual hosting'.

However, FTP has no way of doing this, and in HTTPS the `Host:' header is theoretically available inside of the encrypted data, but unfortunately, the encryption and authentication strategies involved require that a particular host is selected before it has enchanged the keys necessary to decrypt the encrypted data containing the actual HTTP request, so HTTPS is also unable to use virtual hosting.

The URL (Uniform Resource Locator) that is used as the "visible" form of an address is a combination of a protocol name, an address (symbolic or numeric), an optional port number (if we're not using the standard port number for the protocol in question), and then optionally a path inside the server. The first three parts are directly involved in how the client talks to the server, while the path is just a name of the page inside the particular server.

What It Means For Roxen

The result of the situation described above is that there can only be one protocol per port, and that the HTTPS and FTP protocols are additionally restricted to one virtual host per port, while HTTP can have share one port between many virtual hosts.

Ports are configured for a server under the Settings->URLs in the Roxen configuration interface. Clicking `New row' will make room for a new port, which is described by a simplified URL, which normally takes the form of protocol name followed by colon, followed by a double slash, followed by an asterisk (to indicate that we mean to use the local machine, whichever it is), and then optionally colon and a port number, if we don't mean to use the standard port number for the protocol.

For HTTP, roxen will automatically figure out whether any virtual hosting will be required (if you set up several HTTP services for the same port number).