O'Reilly logo

Apache: The Definitive Guide, Second Edition by Peter Laurie, Ben Laurie

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

1.4. What the Client Does

Once the server is set up, we can get down to business. The client has the easy end: it wants web action on a particular URL such as http://www.apache.org/. What happens?

The browser observes that the URL starts with http: and deduces that it should be using the HTTP protocol. The "//" says that the URL is absolute,[††] that is, not relative to some other URL. The next part must be the name of the server, www.apache.org. The client then contacts a name server, which uses DNS to resolve this name to an IP address. At the time of writing, this address was 204.152.144.38. One way to check the validity of a hostname is to go to the operating-system prompt[‡‡] and type:

[††] Relevant RFCs are 1808, Relative URLs, and 1738, URLs.

[‡‡] The operating-system prompt is likely to be ">" (Win95) or "%" (Unix). When we say, for instance, "Type % ping," we mean, "When you see `%', type `ping'."

            > ping -c 5 www.apache.org
         

or:

% ping -c 5 www.apache.org
         

If that host is connected to the Internet, a response is returned:

PING www.apache.org (204.152.144.38): 56 data bytes 64 bytes from taz.apache.org (204.152.144.38): icmp_seq=0 ttl=247 time=1380 ms 64 bytes from taz.apache.org (204.152.144.38): icmp_seq=1 ttl=247 time=1930 ms 64 bytes from taz.apache.org (204.152.144.38): icmp_seq=2 ttl=247 time=1380 ms 64 bytes from taz.apache.org (204.152.144.38): icmp_seq=3 ttl=247 time=1230 ms 64 bytes from taz.apache.org (204.152.144.38): icmp_seq=4 ttl=247 time=1360 ms --- www.apache.org ...

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