Chapter 9: Web Site and Server Maintenance




Download 430 Kb.
bet15/28
Sana21.03.2017
Hajmi430 Kb.
#805
1   ...   11   12   13   14   15   16   17   18   ...   28

The Concept of TCP Ports

Now that we’ve seen how host names are assigned, let’s consider another important concept that applies to the Uniform Resource Locator your users will see.


The TCP/IP protocol suite carries with it the concept of a TCP port. When your user’s browser connects to your Web server to fetch your CI home page, it connects to a particular host name – that of your server – and as part of the connection process it requests a particular TCP “port” number. By default, for the Web the relevant port number is 80. When you install Web server software, you can configure it to operate on any port number you choose. The vast majority of Web servers operate on the default port of 80. Other Internet services have their own assigned default port numbers; for instance, the remote login protocol Telnet is assigned port 23. By assigning different port numbers to different kinds of services, a single physical server box can handle multiple kinds of Internet services without conflict.
For your main Web presence, it’s a good idea to stick with the convention of using port 80. It is possible to run more than one Web server “process” or “service” on a single server, in which case you may wish to choose other port numbers, such as 8000, for secondary servers.
With this discussion, we can see how your server name choice, TCP port choice, and file name choices combine to determine the URL of a document on your server:


  • Every URL for a Web page begins with http:// though many browsers allow users to omit that prefix.

  • Next comes the address of the server. This is a host name within a domain. In the diagram’s example, the server’s address is www.smallville.org.

  • Optionally, the host name may be followed by a colon and a TCP port number, for example www.smallville.org:80. You will only specify a TCP port other than 80 if you have installed a Web server that listens on the port in question. (If you publish a URL with a port number for which there is no corresponding Web server, your users’ browsers will display errors.)

  • Next comes the path to the specific file on the server. As you’ll recall from Chapter 4, this path name begins at the start of the server’s hierarchy, as specified in a server configuration file, not the absolute root of the server hard disk.

Thus, we might offer all of these URLs:
http://www.smallville.org/

http://www.smallville.org/events.html

http://www.smallville.org:8000/

http://www.smallville.org:8000/events.html


The first two examples assume a server on TCP port 80. The second two explicitly refer to a server on port 8000.
If you never deviate from the default of port 80, you will never need to publish URLs with a port number in them, and your users will never encounter such URLs when traversing your site.


Download 430 Kb.
1   ...   11   12   13   14   15   16   17   18   ...   28




Download 430 Kb.

Bosh sahifa
Aloqalar

    Bosh sahifa



Chapter 9: Web Site and Server Maintenance

Download 430 Kb.