ppt - McMaster University

advertisement
Web Servers:
The Engines that Drive
the World Wide Web
Dr. William Farmer
Reza Sherafat
McMaster University
May 3, 2006
Outline

Computer Networks

The client-server model

Creating and installing a web page

How a web server works
Computer Networks

A network is a group of computers connected
together

The Internet is the global
computer network

Different services are
provided by servers
across the Internet and clients access those
services
Network Addresses

To be identified on the network, computers have unique
addresses associated with them

The addresses are managed by a protocol called Internet
Protocol (IP)

192.168.17.3 is an IP address

IP addresses are hard to remember, so to be more
readable Hostnames are used

Each host name is associated with one IP address

www.mcmaster.ca is a hostname which is equivalent to
130.113.64.64
Fundamentals

Computer applications

Process: a running program in a computer

To be able to access the outside world on the
network, processes communicate through ports.

Port: entry points to a computer system (denoted by
a port #).
Client – Server Model
Client 1
Process
Port
Connection
Client 2
Server
Client – Server Model

A server process provides services.

A server process at a server listens to a port, and is
ready to receive client requests.

A client process at a host, communicates to the
server process by connecting to the port # that the
service is listening to.

The client has to know the server address, the
server port # and the protocol to communicate to the
server process.
Protocols
Daytime service [RFC867]:
Client: Hello, <client address> here. May I have a timestamp please.
Server: Here it is: (time stamp follows)
World Wide Web session (HTTP):
Client: Hello, <client address> here.
Server: Okay. I am a web server and speaks protocol HTTP1.0.
Client: Great, please get me the web page index.html at the root of your
document tree.
Server: Okay, here’s what’s in the page: (contents follows).
HTTP Protocol
GET
Page1.html
Page1.html
Server
HTTP Protocol
GET
Image.jpg
The browser at the client parses
the HTML document and determines
that some pictures should also be
loaded.
- The browser request the
image files the same way.
Server
Client – Server Model

The request/response
sequence continues …
client
server
request1
response 1
request2
response 2
requestn
response n
Write/upload and access your own online
content

Open a browser and retrieve the template at
http://wiglaf.cas.mcmaster.ca/workshop/template/

You need to edit the template and fill it out with your own information.


You may use any text editor (e.g. notepad)
You can easily change the



Page title
Content
Pictures: You can use the images that you find from the web.

Save your changes to the template, and rename it.

Upload you new file using the upload page at
http://wiglaf.cas.mcmaster.ca/workshop/upload/

Use the link to access your page.
How a web server works?
Download