Web Sites and Web Servers by NBtooY5


									        Web Sites and Web Servers

Q: What is a Web Site?

A: For our purposes, a web site is a collection
or a set of directories with web resources
sitting on a server out there somewhere in the

Q: What is a web server?

A: A web server is assigned the
responsibility of responding to
different types of requests from

Q: What are some of the types of requests that
a web server might have to accommodate?

A: Typically, the main form of request comes in
terms of HTTP…the Hypertext Transfer

Requests are made by users
(usually from their browser) to be
supplied some type of resource

               More on that later

            Back to the Web Site…
Q: What kind of stuff does the set of
directories/subdirectories on the web server

A: Simplistically, a web site contains the

   Resources to be served to the user

   Files that pertain to the operation of the
    web server itself

Q: What is the name of the web server we’re
using in this class?

A: Apache.

   The Apache web server is JUST ANOTHER
application…a specialty application, but just
another application

    Apache has been ported to several

   We are running Apache in a Linux

   When running in a UNIX/Linux environment,
an instance of Apache is referred to as httpd

Each instance of httpd has its attention directed
toward the set of directories known as a web
Q: What is the typical structure of a web

A: A web site is broken into two main

1. The document space

2. The server space

The directory tree of a web site might look
like this:

                |----- conf
                |------ htdocs
                |          |----- things
                |          |----- stuff
                |------ logs
           `    |
                |------ cgi-bin
The path /usr/local/www/apache represents
the SERVER ROOT…a privileged
area…users do not belong here

The path /usr/local/www/apache/htdocs
represents the DOCUMENT ROOT…the
web space

Note that there are four distinct sections
under /usr/local/www/apache:

    Contains configuration files the most
     important of which is httpd.conf

    Typically, contains html and php
     scripts to be served to and used by

    This directory and all child
     directories of this directory are
     considered the WEB
     ONLY data that is for PUBLIC
      CONSUMPTION goes here because
      of security risks
     contains log files containing access
      and error data

     Contains CGI scripts

    CGI scripts are scripts that are
     executed by apache on behalf of the

    Because of security concerns, these
    What Little We Should Know About
Q: What is TCP/IP?

A: A protocol developed for delivering
packets of data across a network

Q: What about the IP part?

A: IP is an addressing scheme

  On any network, each node MUST have
   a unique address

  IP addresses consist of 4 one-byte
   numbers, each separated by a dot

  The numbers range in value from 0 -

  For example,
  For data routing purposes, the IP
   address contains a “dividing line” that
   separates the NETWORK NUMBER
   from the HOST NUMBER

  This is a convention, NOT a protocol

The number to the left of the “line” is the
NETWORK number

The number to the RIGHT is the HOST

Q: OK…Where’s the line?

A: The position of the “line” is determined
by the FIRST number

0 - 127 (0xxx xxxx binary)
   The “line” is after the first number

  This constitutes a class A network

  125 USUABLE networks each capable
   supporting a maximum of > 16M hosts
128 - 191 (10xx xxxx binary)
   The “line” is after the second number

  This constitutes a class B network

  More than 16K USUABLE networks
   each capable of supporting maximum
   of > 64K hosts

192 - 223 (110x xxxx binary)
   The “line” is after the third number

  This constitutes a class C network

  More than 2M USUABLE networks each
   capable of supporting maximum of 254

 NOTE that values of 224 - 225 will not be
 discussed here

    Network numbers of ALL ZERO
     values or ALL ONE values are
     reserved for special purposes and
     will not be discussed here
 An ALL 0 network number means
  “this network”

 An ALL 1 network number is a
  broadcast address

 The IP address is a special
  address that is called the “loopback
  address” and also refers the that
  particular machine and is typically
  used for testing purposes

 means “this machine”
The rules of class A, B, and C network
numbering can be bypassed using subnet

   Subnet masks are beyond the scope
    of this class, BUT…

   Note that Apache supports the notion
    of “virtual hosting”…many hosts
    running on one machine

   Subnet masking is required for
    virtual hosting under HTTP 1.0

   HTTP 1.0 requires each virtual host
    have a unique IP address

   HTTP 1.1 removes this requirement,
    but until it is in FULL effect, we live
    with subnet masking
Q: What about the TCP part?

A: There are two ways to deliver packets
of data

1. UDP (User Datagram Protocol)
    a. single packets only

   b. no guarantee of delivery

   c. no ACK of receipt of delivery

2. TCP (Transmission Control Protocol)
    a. messages of any size (sort of…)

   b. reliable delivery

To top