O'Reilly logo

Linux and Unix Shell Programming by David Tansley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

29.3. Connecting to a Web server

To connect to a Web server you use a Uniform Resource Locator (URL). The URL contains two pieces of information:

The protocol The address and data 

The protocol can consist of http, ftp, mailto, file, telnet and news. We will only be concerned with http, which stands for hypertext transfer protocol.

The address is usually the DNS name or hostname of the server, but can be the IP address. Other data can also be the actual pathname to the file that you wish to access.

All connections are carried out using the TCP protocol, which defaults to port 80 on your machine.

If you have a Web server set up on your local host, with a main HTML page called index.html, then you would type:

http://localhost/index.html 

Generally ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required