web server sun peng 2005 @icu. what is server - question first thing first! we need a definition:...

31
Web Server Sun Peng 2005 @ICU

Upload: karlie-shuker

Post on 14-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

Web Server

Sun Peng 2005 @ICU

Page 2: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

What is server - Question

First thing first! We need a definition:

What is a server?

?

Page 3: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

What is server - Answer (1)

A computer software application that carries out some task (i.e. provides a service) on behalf of another piece of software called a client.

The physical computer on which such software runs.

Page 4: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

What is server - Answer (2)

Sometimes this dual usage can lead to confusion, so in the following presentation, the web server means the software, such as the Apache HTTP server, which manages the delivery of web page components in response to requests from web browser clients.

Page 5: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

First Web Server (1)

In 1989 Tim Berners-Lee proposed to CERN a new project, a hypertext system. Tim Berners-Lee wrote two programs: a www-browser WorldWideWeb and the world's first web server, which ran on NeXTSTEP.

Page 6: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

First Web Server (2)

Page 7: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

How a web server works

Every web server program operates by accepting HTTP requests from the network, and providing an HTTP response to the requester.

Page 8: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

HTTP - the language

HTTP is the protocol that web servers and browsers used to communicate over the Internet.

It is a request and response protocol--the client makes a request and the server responds to it

HTTP uses reliable TCP connections, by default on TCP port 80.

The first version of HTTP was HTTP/0.9, which was then overridden by HTTP/1.0. The current version is HTTP/1.1.

Page 9: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

HTTP Request

An HTTP request consists of three components: Method-URI-Protocol/Version Request headers Entity body

Page 10: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

HTTP Request Example

POST /servlet/default.jsp HTTP/1.1Accept: text/plain; text/html Accept-Language: en-gb Connection: Keep-Alive Host: localhost Referer: http://localhost/ch8/SendDetails.htm User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows 98) Content-Length: 33 Content-Type: application/x-www-form-urlencoded Accept-Encoding: gzip, deflate

Page 11: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

HTTP Response

an HTTP response also consists of three parts:Protocol-Status code-Description Response headers Entity body

Page 12: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

HTTP Response Example

HTTP/1.1 200 OKServer: Microsoft-IIS/4.0Date: Mon, 3 Jan 1998 13:13:33 GMTContent-Type: text/htmlLast-Modified: Mon, 11 Jan 1998 13:23:42 GMTContent-Length: 112

<html><head><title>HTTP Response Example</title></head><body>Welcome to Brainy Software</body></html>

Page 13: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

Are you familiar with this page?

Page 14: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

The Basic Process

Page 15: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

Behind the screen – B&S (1)

The browser breaks the URL into three parts: The protocol ("http") The server name ("bigbear.icu.ac.kr") The file name ("~iko/index.htm")

The browser communicates with a name server to translate the server name " bigbear.icu.ac.kr " into an IP Address, which used to connect to the server machine.

Page 16: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

Behind the screen – B&S (2)

The browser then forms a connection to the server at that IP address on port 80.

Following the HTTP protocol, the browser send a GET request to the server, asking for the file "http://bigbear.icu.ac.kr/~iko/index.html."

Page 17: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

Behind the screen – B&S (3)

The server now responds to the browser's requests. It verifies that the given address existsfinds the necessary filesruns the appropriate scriptsexchanges cookies if necessaryreturns the results back to the browser

Page 18: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

Behind the screen – B&S (4)

The browser read the HTML tags and formatted the page onto your screen.

Page 19: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

Other Duties of Web Server - (1)

A Web server should distinguish various errors and data types. A Web server must designate the proper code f

or any sort of internal error and send that back to the browser immediately after it occurs.

It also has to distinguish between various elements on a Web page (such as .GIFs, JPEGS and audio files) so that the browser knows which files are saved in which format.

Page 20: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

Other Duties of Web Server - (2)

Depending on the site's function, a Web server may also have numerous additional tasks to handle, including logging statistics from database, handling security and encryption, serving images for other sites (for banners, …)generating dynamic content, managing e-commerce functions. etc.

Page 21: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

Category: Two world

Commercial Free

Page 22: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

List

FreeApache httpdAbyss Web Server

X1CaudiumCherokee HTTP Ser

verLighttpd

CommercialAbyss Web Server

X2BEA WebLogicZeus Web ServerMicrosoft Internet Inf

ormation ServicesRedhat StrongholdSun ONE

Page 23: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

Which is better?

I don’t know. But…

Software is like sex. It's better when it's free.

By Linus Torvalds, the father of Linux

Who said it? Not me…..

Page 24: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

It is!

Apache is by far the most common software, with over 69% market share according to the June 2005 Netcraft Web Server Survey

Microsoft 20.26% Sun 2.85% Zeus 0.90%

Source:

http://news.netcraft.com/archives/2005/07/01/july_2005_web_server_survey.html

Page 25: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

Apache

Apache is the web server component of the popular web server application stack called LAMP (Linux, Apache, MySQL, PHP/Perl).

Apache was built by a group of open-source programmers and is often used because of its outstanding performance, strong security features and the fact that it is free.

Page 26: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

Apache – History

Before Apache: In February of 1995, the most popular server software is NCSA httpd.

Using NCSA httpd 1.3 as a base, a group of programmer continued the development.

Apache 1.0 was released on Dec. 1, 1995. Apache 2.0.15 (alpha) was released on 28,

March,2001 Latest stable version: Apache 2.0.54

Page 27: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

Apache – Features (1)

powerful, flexible, HTTP/1.1 compliant web server implements the latest protocols, including

HTTP/1.1 highly configurable and extensible with third-party

modules can be customized by writing 'modules' using the

Apache module API provides full source code and comes with an

unrestrictive license runs on Linux, Windows, Netware 5.x and above,

OS/2, and most versions of Unix, etc

Page 28: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

Apache – Features (2)

implements many frequently requested features, including:DBM databases for authentication Customized responses to errors and problems Multiple Directory Index directives Unlimited flexible URL rewriting and aliasing Content negotiation Virtual Hosts Configurable Reliable Piped Logs

Page 29: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

Reference

RFC 2616—The Request for Comments document that defines the HTTP 1.1 protocol.

Apache FAQ http://httpd.apache.org/docs/misc/FAQ.html

Page 30: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

Any questions?

Please……..

Page 31: Web Server Sun Peng 2005 @ICU. What is server - Question  First thing first! We need a definition: What is a server? ?

Thank you!

Bye~~!