Introduction to Web Graphics Understanding the Basics of Web Graphics 1 WEB SERVERS 2 Objectives In this chapter, you will • Learn about Internet Information Services • Become familiar with the compon[.]
Trang 1WEB SERVERS
Trang 2In this chapter, you will:
• Learn about Internet Information Services
• Become familiar with the components of a Web server, and specify the Web server's home
directory and default document
• Create and configure Web server physical
directories, virtual directories, and applications
Trang 3In this chapter, you will:
• Learn how to organize a Web server
• Learn how to reference files on a Web server
• Understand the factors that impact Web site
performance
Trang 4Web Servers
• Web servers: computers that are connected to
the Internet and run Web server software
• A personal Web server: allows only a limited
number of user connections
• A production Web server: available to anyone
who connects to the Internet
Trang 5Internet Information Services
• Internet Information Services (IIS)
– Web server software that comes with Windows NT,
Windows 2000, and Windows XP
– Includes an administration utility to create,
manage, and administer a Web server
• A Web server is also called a Web site
Trang 6Internet Information Services
• IIS administrative utility: performs Web server
administrative tasks within IIS
• In Windows XP, the administrative utility is part of Internet Information Services
• IIS: the Web server software
• IIS console: the administrative utility within IIS
Trang 7Internet Information Services
• Console: an environment for administering a
computer resource
• Microsoft Management Console (MMC): an
environment for administering computer
resources
• Snap-ins: Network administrators create custom consoles, which are components for computer management tasks that can be “snapped into” a generic console as needed
Trang 8Internet Information Services
• IIS console: a custom console containing the Internet
Information Services snap-in, which includes components for administering Web servers
• Figure 5-1 shows the IIS console
Trang 9Web Server Components
• Home directory: directory on the Web server that
is the starting point for accessing the Web pages, graphic image files, programs, and other files that are available from the Web site
• Console tree: displays the components within a Web server’s home directory as physical
directories, virtual directories, and applications
Trang 10Web Server Components
• Physical directories: created within the Web
server’s home directory, or within directories that the Web administrator associates with other Web server components
• Virtual directories: may or may not be physically within the Web server’s home directory, but
appear to client browsers as though they are
• Applications: virtual directories that have the
permissions necessary to run server-side
executable programs and scripts
Trang 11Web Server Components
• To administer a Web server, a Web administrator must
– Designate and configure the Web server’s home
directory and default document
– Create and configure the Web server’s physical
directories, virtual directories, and applications
• Many Web server configuration tasks are
performed using the Web Site Properties dialog box in the IIS console
Trang 12The Web Site Properties Page
• The Web Site
properties page is used to configure the properties that identify the Web site, such as its IP address, port, connection timeout value, and the active log format
Trang 13The Home Directory Properties Page
• The home
directory for a Web server is specified on the Home Directory properties page
Trang 14The Home Directory Properties Page
• The first three option buttons on the Home Directory
properties page specify whether the Web site displays
documents from:
– A directory located on this computer
– A share located on another computer
– A redirection to a URL
• Local Path field: specifies the path to the home directory
• The remaining properties on the Home Directory properties
page specify permissions that the system grants to users who connect to the Web site in the home directory
Trang 15The Home Directory Properties Page
• Today, most computers are connected to
networks
• Network share:
– makes computer files available to other users on a
network
– a drive or directory that network administrators
configure so that users can view and manipulate its files and subdirectories from other network
computers
Trang 16The Documents Properties Page
• When a user enters a URL that contains a Web
server domain name or IP address but no HTML Web page filename in the Address field on his or her Web browser, the Web server returns its
default document, if one exists
• The default document filename is specified on the Documents properties page in the Properties
dialog box
Trang 17The Documents Properties Page
• On this page, the Enable Default Document check box
is used to enable or disable the default document
Trang 18Creating and Configuring Web Server
Trang 19Physical Directories
• Physical directories: enable the Web administrator to
– Organize the contents of the local Web site
– Control access privileges for files and applications
• Physical directory exists:
– Within the Web server’s home directory
– Within a directory associated with a virtual directory – Within a directory associated with an application
Trang 20Physical Directories
• To access files that are in a physical directory on the Web server’s home directory, a user can enter the URL for a Web server, a front slash (/), the
name of the physical directory, another front
slash, and the filename
Trang 22Virtual Directories
• Virtual directory
– Appears to client browsers as a physical directory
within the home directory
– Can be associated with a physical directory that is
located anywhere in the Web server’s file system,
on a network share, or using a redirection to a URL that references a directory on another Web server
Trang 23Virtual Directories
• Virtual directory:
– Can enable users to access Web pages and other
files stored in directories outside the home
directory and its subdirectories
– Has an associated alias, which is the name that
client browsers use to access the virtual
directory’s contents
• Alias:
– usually shorter than the original directory path
specification
Trang 24Virtual Directories
• Virtual Directory Creation Wizard:
– Creates a virtual directory in the IIS console
– Presents a series of pages that prompt the
administrator to enter the specifications for the
virtual directory
Trang 25Virtual Directories
• These pages include:
– A Welcome page
– An Alias page
– A Web Site Content Directory page
– An Access Permissions page
– A Finish page
Trang 26• Application: a virtual directory with access
permissions that enable users to run server-side executable programs or scripts stored in the
physical directory associated with the virtual
directory
• Create an application: use the Virtual Directory Creation Wizard and specify on the Access
Permissions page that users can execute scripts
or executable files within the virtual directory
Trang 27• Application: created for every server-side
compiled program or script on a Web server
• A server-side compiled program or script starts a process that runs in the Web server’s memory
and controls the program’s execution
• Process space: memory area where a process
runs
• The location of a program’s process space is
based on the memory model of its associated
Trang 28• A memory model
specifies how an environment
stores the data for its processes
in the main memory of a computer
Trang 29Organizing Your Web Server
• Web administrators organize Web server files by placing them in directories that make the files easier to locate and manage
• These directories enable the administrator to control file access permissions and ensure the security of the Web site
• Many Web administrators organize Web server files by creating separate directories for different types of files
Trang 30Referencing Files on a Web Server
• Current working directory: contains the Web page that currently appears in the user’s browser
• When objects such as graphic images in a Web page are referenced, either
– the object file must be placed in the same directory
as the Web page or
– an absolute or relative file path must be specified
to the object file
Trang 31Absolute URL Addresses
• Absolute URL address specifies:
– Web server IP address or domain name
– Complete path or virtual directory path to the Web
page file, and
– Name of the Web page file
• Absolute URL address
– can be placed in a browser’s Address field
– in a hyperlink tag to specify the location of a Web
page file or
Trang 32Absolute URL Addresses
Figure 5-19 shows absolute URL addresses
Trang 33Relative URL Addresses
• Relative URL address:
– Location of a file relative to the current working
directory
– Can be used to specify files stored in physical
directories on the Web server
• A file that is in a physical directory within the
current working directory is referenced by typing the physical directory name, a front slash (/), and then the filename, using the following syntax:
Trang 34Relative URL Addresses
• A file that is in the parent directory of the current working directory is referenced by specifying the parent directory using two periods ( ) followed by
a front slash (/), using the following syntax:
/filename
Trang 35Factors Impacting Web Site
Performance
• Users of Web sites frequently experience delays while waiting for their browsers to display the
pages they request
• Factors in response time include:
– Speed of the Web server’s network connection
– Amount of main memory that the Web server's
administrator allocates to process Web page
requests
– Web server's processor speed
Trang 36Factors Impacting Web Site
Performance
• Factors in response time include (continued):
– Number of other visitors currently requesting
pages or files from the Web site
– Size of Web page files and their embedded
graphics objects
– Server resources required to execute Web-based
programs and scripts in Web pages
Trang 37Factors Impacting Web Site
• Web administrators should always assume that visitors will have fairly slow network connections
Trang 38• Internet Information Services (IIS) includes the IIS console for administering a Web server and the listener process for servicing user requests to a Web server
• A Web server’s home directory is the Web server directory that contains the Web server’s default document
• A physical directory is a folder within the Web server’s file system that is within the home directory, a virtual directory, or an application
Trang 39• A virtual directory is not necessarily physically within the home directory, but appears to client browsers as though it is
• Applications: virtual directories in which
permissions exist to allow users to run scripts or executable files
• When an object on a Web page is referenced, the referenced object must be in the same physical
or virtual directory as the Web page that currently