13
Web Servers: The Engines that Drive the World Wide Web Dr. William Farmer Reza Sherafat McMaster University May 3, 2006

Web Servers: The Engines that Drive the World Wide Web Dr. William Farmer Reza Sherafat McMaster University May 3, 2006

Embed Size (px)

Citation preview

Page 1: Web Servers: The Engines that Drive the World Wide Web Dr. William Farmer Reza Sherafat McMaster University May 3, 2006

Web Servers: The Engines that Drive the World Wide Web

Dr. William FarmerReza Sherafat

McMaster UniversityMay 3, 2006

Page 2: 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

Page 3: Web Servers: The Engines that Drive the World Wide Web Dr. William Farmer Reza Sherafat McMaster University May 3, 2006

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

Page 4: Web Servers: The Engines that Drive the World Wide Web Dr. William Farmer Reza Sherafat McMaster University May 3, 2006

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

Page 5: Web Servers: The Engines that Drive the World Wide Web Dr. William Farmer Reza Sherafat McMaster University May 3, 2006

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 #).

Page 6: Web Servers: The Engines that Drive the World Wide Web Dr. William Farmer Reza Sherafat McMaster University May 3, 2006

Client – Server Model

Process

Port

ServerClient 2

Client 1

Connection

Page 7: Web Servers: The Engines that Drive the World Wide Web Dr. William Farmer Reza Sherafat McMaster University May 3, 2006

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.

Page 8: Web Servers: The Engines that Drive the World Wide Web Dr. William Farmer Reza Sherafat McMaster University May 3, 2006

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).

Page 9: Web Servers: The Engines that Drive the World Wide Web Dr. William Farmer Reza Sherafat McMaster University May 3, 2006

HTTP Protocol

Server

GETPage1.html

Page1.html

Page 10: Web Servers: The Engines that Drive the World Wide Web Dr. William Farmer Reza Sherafat McMaster University May 3, 2006

HTTP Protocol

Server

GETImage.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.

Page 11: Web Servers: The Engines that Drive the World Wide Web Dr. William Farmer Reza Sherafat McMaster University May 3, 2006

Client – Server Model

The request/response sequence continues …

clie n t s e rve r

re qu e s t 1

re qu e s t 2

re qu e s t n

re s pon s e 1

re s pon s e 2

re s pon s e n

Page 12: Web Servers: The Engines that Drive the World Wide Web Dr. William Farmer Reza Sherafat McMaster University May 3, 2006

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.

Page 13: Web Servers: The Engines that Drive the World Wide Web Dr. William Farmer Reza Sherafat McMaster University May 3, 2006

How a web server works?