Presentation is loading. Please wait.

Presentation is loading. Please wait.

Web Server Sun Peng What is server - Question  First thing first! We need a definition: What is a server? ?

Similar presentations

Presentation on theme: "Web Server Sun Peng What is server - Question  First thing first! We need a definition: What is a server? ?"— Presentation transcript:

1 Web Server Sun Peng 2005 @ICU

2 What is server - Question  First thing first! We need a definition: What is a server? ?

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

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

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

6 First Web Server (2)

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

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

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

10 HTTP Request Example POST /servlet/default.jsp HTTP/1.1 Accept: 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

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

12 HTTP Response Example HTTP/1.1 200 OK Server: Microsoft-IIS/4.0 Date: Mon, 3 Jan 1998 13:13:33 GMT Content-Type: text/html Last-Modified: Mon, 11 Jan 1998 13:23:42 GMT Content-Length: 112 HTTP Response Example Welcome to Brainy Software

13 Are you familiar with this page?

14 The Basic Process

15 Behind the screen – B&S (1) TThe browser breaks the URL into three parts: The protocol ("http") The server name ("") The file name ("~iko/index.htm") TThe browser communicates with a name server to translate the server name " " into an IP Address, which used to connect to the server machine.

16 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 ""

17 Behind the screen – B&S (3) TThe server now responds to the browser's requests. It verifies that the given address exists finds the necessary files runs the appropriate scripts exchanges cookies if necessary returns the results back to the browser

18 Behind the screen – B&S (4)  The browser read the HTML tags and formatted the page onto your screen.

19 Other Duties of Web Server - (1) AA Web server should distinguish various errors and data types. A Web server must designate the proper code for 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.

20 Other Duties of Web Server - (2) D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.

21 Category: Two world CommercialFree

22 List  Free Apache httpd Abyss Web Server X1 Caudium Cherokee HTTP Server Lighttpd  Commercial Abyss Web Server X2 BEA WebLogic Zeus Web Server Microsoft Internet Information Services Redhat Stronghold Sun ONE

23 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…..

24 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:

25 Apache  Apache is the web server component of the popular web server application stack called LAMP (Linux, Apache, MySQL, PHP/Perl). LAMPLinuxApacheMySQLPHPPerl  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.

26 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

27 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

28 Apache – Features (2) i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

29 Reference  RFC 2616—The Request for Comments document that defines the HTTP 1.1 protocol. RFC 2616Request for CommentsHTTP  Apache FAQ

30 Any questions? Please……..

31 Thank you! Bye~~!

Download ppt "Web Server Sun Peng What is server - Question  First thing first! We need a definition: What is a server? ?"

Similar presentations

Ads by Google