5 chapter five web servers. 5 chapter objectives learn about the microsoft personal web server...

46
5 Chapter Five Web Servers

Upload: annis-gregory

Post on 28-Dec-2015

215 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 ChapterFive

Web Servers

Page 2: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Chapter Objectives

• Learn about the Microsoft Personal Web Server Software

• Learn how to improve Web site performance

• Learn about absolute and relative URL addresses

• Compare Personal Web Server to other Web servers

Page 3: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Web Servers

• Web servers are computers connected to the Internet and run special Web server software

• Software includes a component called a listener, which monitors for Web page requests that are sent to the Web server from client browsers

Page 4: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Web Servers

• When a browser requests a particular Web page from a Web server, the Web server sends the HTML file for the Web page to the client browser

• The Web server also processes server-side programs that create dynamic Web pages

Page 5: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Personal Web Server

• Personal Web Server (PWS) is software– Designed to create and manage a Web server,

also called a Web site, on a desktop computer

– Used to learn how to set up and administer a Web site

– Used as a site for testing dynamic Web pages

Page 6: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Personal Web Server

• A visitor is a user who uses browsers to make connections and request Web pages

• PWS can support only 10 Web server connections at one time– A Web server connection corresponds to a

socket on the Web server– A socket is an endpoint of a communications

connection

Page 7: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Personal Web Server

• Each connection between a client and server creates a socket on both the server and client

• Each socket has a corresponding memory location that specifies information about the connection

• Each Web server socket also has another corresponding memory location that stores incoming data requests from the user’s Web browser

Page 8: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Personal Web Server

• To make Web pages appear faster, many Web browsers can create up to four simultaneous connections to a Web site

• PWS Web sites cannot service requests from more than two or three simultaneous visitors in a timely manner

Page 9: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Personal Web Server

• Production Web server – A Web server that can be accessed by anyone

connected to the Internet

• Personal Web Manager – A PWS utility – Allows you to modify the configuration of

PWS

Page 10: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Personal Web Server

Figure 5-1: Personal Web Manager Main page

Page 11: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Personal Web Server

• Main page– Shows the URL for your PWS, and drive letter

and folder path to PWS’s root document folder

• Publish page and Web Site pages– Have wizards that automate the process of

creating and editing HTML documents and creating links to documents

Page 12: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Personal Web Server

• Tour page – Provides a basic overview of PWS

• Advanced page – Allows you to specify the Web server’s root

document directory and default document filenames, and to configure other Web server properties

Page 13: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Personal Web Server

Figure 5-2: Advanced Options page

Page 14: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 The Web Server Root Document Directory and Default Document

• Root document folder– Central folder containing all Web pages, graphic

images, programs, and other files available from the Web site

• When a visitor specifies in his or her Web browser a URL that contains a Web server domain name or IP address, but no HTML Web page filename, the server returns the HTML document that has been specified as the Web server's default document

Page 15: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 The Web Server Root Document Directory and Default Document

• To make Web pages appear faster, most Web browsers are configured to cache, or save, recently viewed Web pages on the local hard drive

• Every computer that connects to the Internet must have a unique IP address

Page 16: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 The Web Server Root Document Directory and Default Document

• Some computers have static IP address, which are IP addresses that:– Never changes and refers only to a specific computer– Are assigned to computers that stay in the same

physical location or computers that are servers

• Dynamic IP address– Assigned to a computer from a list of available

addresses each time the computer is booted and its Internet access software is loaded

– Might change each time the computer is booted

Page 17: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Directory Browsing

• Directory browsing – Allows Web site visitors to use a folder listing

to navigate to different files on the Web server– When enabled, PWS will display a list of all

files in the root document folder if the default document file is not specified or found

Page 18: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Directory Browsing

Figure 5-4: Listing of PWS root document folder contents

Page 19: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 The Web Site Activity Log

• Web Site Activity Log – Maintains a list of the IP addresses of computers

that connect to your Web site

Figure 5-6: Web Site Activity Log file

Page 20: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 The Web Site Activity Log

• Log file– Contents can be viewed using any text editor or

word processor

Figure 5-7: Log file contents

Page 21: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 The Web Site Activity Log

• When using IP addresses in the log file to identify who is accessing your Web site:– Visitors with dynamic IP addresses usually

cannot be identified– Visitors with static IP addresses and associated

domain names can sometimes be identified, using a utility named Nslookup

Page 22: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 The Web Site Activity Log

Figure 5-8: Using Nslookup to find the identity of a Web site visitor

Page 23: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 The Web Site Activity Log

• Information about domain names can be located using Web-based services that maintain information about domain names

Figure 5-9: Information about a Web site visitor’s domain name

Page 24: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Creating Virtual Directories

• Virtual directory – Folder that does not have to be physically within the

root document folder, but always appears to client browsers as though it is

• Alias– Name client browsers can use to access that directory– Usually shorter than the folder pathname – More secure since visitors do not need to know the

names of folders where your server files are located

Page 25: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Creating Virtual Directories

Figure 5-10: Virtual directory properties

Page 26: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Creating Virtual Directories

Figure 5-11: Folder listing of a virtual directory

Page 27: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Creating Virtual Directories

Figure 5-12: Creating a virtual directory

Page 28: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Managing Virtual Directory Access Privileges

• Read access– Enables a visitor’s Web browser to read or

download files stored in virtual directory

• Execute access – Enables Web clients to run compiled

(executable) Web applications as well as server-side scripts stored in a virtual directory

Page 29: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Managing Virtual Directory Access Privileges

• Scripts access– Enables a visitor’s browser to run only scripts that

are stored in the virtual directory, not executable programs

Table 5-1: Virtual directory privilege types and associated file types

Page 30: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Managing Virtual Directory Access Privileges

Figure 5-13: Creating the cgi-bin virtual directory

Page 31: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Monitoring Web Site Performance

• Monitoring section of Personal Web Manager Main page allows you to monitor statistics about visits to your Web site

• Data are collected about the following items:– Active connections, Started at, Visitors,

Requests, Bytes served, and Most concurrent connections

Page 32: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Monitoring Web Site Performance

• Active connections – Represents number of active server connections

currently being used to transfer data to visitor browsers

• Started at – Shows when the server was last started

• Visitors – Shows number of unique IP addresses connected to

the server since the workstation was last started

Page 33: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Monitoring Web Site Performance

• Requests – Shows number of requests received since the computer

was last restarted

• Bytes served – Shows total amount of data sent since last restart

• Most concurrent connections – Shows number of connections opened to the server

simultaneously since the computer was last started

Page 34: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Monitoring Web Site Performance

Figure 5-14: Viewing the monitoring statistics

Page 35: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Factors Affecting Web Site Performance

• Factors affecting time it takes a Web site to service a visitor request include: – Speed of the Web server’s network connection– Amount of main memory that a Web server has

allocated to process Web page requests– Web server’s processor speed

Page 36: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Factors Affecting Web Site Performance

• Factors affecting time it takes a Web site to service a visitor request include (cont.):– Number of other visitors currently requesting

Web site pages or files– Size of Web page files and number and size of

their embedded graphic object files– Resources needed by Web-based programs and

scripts in Web pages

Page 37: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Referencing Files on a Web Server

• When referencing an object on a Web page that is stored on a Web server, the referenced object must be in same folder as the Web page that is currently displayed

• Saving copies of all Web pages and their associated graphic objects in multiple folders on a Web server is not an effective way to use disk space

Page 38: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Referencing Files on a Web Server

• When you change a Web page HTML file, you might not remember to update all the copies of the page file if they stored in multiple places

• A better way to manage referenced objects is by specifying object locations using absolute or relative URL addresses

Page 39: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Absolute URL Addresses

• Absolute URL address– Can be used in browser’s Address box or in a

hyperlink tag to specify complete path location of a Web page file

– Includes the Web server IP address or domain name, the complete folder path or virtual directory path to the Web page file, and the name of Web page file

Page 40: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Absolute URL Addresses

Figure 5-15: Absolute URL addresses

Page 41: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Relative URL Addresses

• Relative URL address– Specifies the location of a file relative to the

current working directory

Table 5-2: Relative path addresses

Page 42: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Comparing PWS to Other Web Servers

• PWS– Supports the most common server-side

programming approaches that can be used with production Web servers

– Can run CGI programs or scripts and Active Server Pages (ASPs)

• IIS – More sophisticated administrative features

Page 43: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Comparing PWS to Other Web Servers

• Internet Service Manager (ISM) utility within IIS:– Supports directory browsing that can be

enabled or disabled for specific directories rather than for the entire Web site

– Provides Write access for virtual directories • Allows visitor browsers to upload and download

files to a Web server

Page 44: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Comparing PWS to Other Web Servers

• Internet Service Manager (ISM) utility within IIS (cont.):– Allows the Web server administrator to tune the

Web site for number of expected hits per day– Provides a higher level of security through NT

file system permissions

Page 45: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Summary

• Personal Web Server (PWS) is software designed to create and manage a Web server on a desktop computer

• Personal Web Manager is a utility used to configure and monitor PWS

• Personal Web Manager is used to specify the Web site root document directory, and the name of the default document

• PWS support directory browsing

Page 46: 5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn

5 Summary

• A Web browser’s current working directory is the folder that contains the Web page that is currently displayed

• PWS provides an excellent environment for learning about Web servers, and for testing Web programs and new Web pages