Web Administration Tools and Techniques
Web administrators will find
that there are many ways to manage Web and application servers. The key
administration tools and techniques are covered in the following sections.
Managing Resources by Using Key
Administration Tools
Many tools are available for
managing Web resources. Key tools you'll use are shown in
Table 1-2. Most of these tools are available on
the Administrative Tools menu. Click Start and choose All Programs,
Administrative Tools, and then the tool you want to use. You can use all the
tools listed in the table to manage local and remote resources. For example, if
you connect to a new computer in IIS Manager, you can manage all its sites and
services remotely from your system.
Table 1-2. Quick Reference for Key Web Administration
Tools
|
Administration Tool | Purpose |
| Active Directory
Users and Computers |
Manages domain
user, group, and computer accounts. |
| Computer Management |
Manages
services, storage, and applications. The Services And Applications node
provides quick access to Indexing Service catalogs and IIS sites and servers. |
| Data Sources (ODBC) |
Configures
and manages Open Database Connectivity (ODBC) data sources and drivers. Data
sources link Web front ends with database back ends. |
| DNS |
Public
Internet sites must have fully qualified domain names (FQDNs) to resolve
properly in browsers. Use the Domain Name System (DNS) administrative snap-in
to manage the DNS configuration of your Windows DNS servers. |
| Event Viewer |
Allows
you to view and manages events and system logs. If you keep track of system
events, you'll know when problems occur. |
| Internet
Information Services (IIS) 6.0 Manager |
Manages
Web and application server resources that were designed for IIS 6. This tool is
included for backward compatibility only. |
| Internet
Information Services (IIS) Manager |
Manages
Web and application server resources that were designed for IIS 7.0. |
| Web
Management Service (WMSVC) |
Allows
you to use the IIS Manager to manage Web and application server resources on
remote servers. |
| Reliability
and Performance Monitor |
Tracks
system reliability and performance allowing you to pinpoint performance
problems. |
| Services |
Views
service information, starts and stops system services, and configures service
logons and automated recoveries. |
When
you add services to a server, the tools needed to manage those services are
automatically installed. If you want to manage these servers remotely, you
might not have these tools installed on your workstation. In that case, you
need to install the administration tools on the workstation you're using.
Web Administration Techniques
Web administrators have many options for
managing IIS. The key administration tools are:
-
IIS Manager (InetMgr.exe)
-
IIS Administration objects made available
through the IIS 7.0 WMI provider
-
IIS command-line administration tool
(AppCmd.exe)
IIS Manager provides the standard
administration interface for IIS. To start IIS Manager, click Start and choose
All Programs, Administrative Tools, and then Internet Information Services
(IIS) Manager. When started, IIS Manager displays the Start page
shown
in Figure 1-1
and automatically connects to the local IIS installation, if it's available. On
the Start page, you have the following options:
-
Connect to
localhost Connects you to the IIS installation on the local computer
-
Connect to a server Allows
you to connect to a remote server
-
Connect to a site
Allows you to connect to a specific Web site on a designated Web server
-
Connect to an application
Allows you to connect to a specific Web application on a designated site and
server
As discussed previously, remote
access to an IIS server is controlled by the WMSVC. When you install and start
WMSVC on an IIS server, it listens on port 8172 on all unassigned IP addresses
and allows remote connections from authorized user accounts. You can connect to
a remote server by following these steps:
1.
|
In Internet Information Services (IIS) Manager, click Start
Page in the console tree and then click Connect To A Server. This starts the
Connect To A Server wizard.
|
2.
|
Type or select the server name in the Server Name box. For a
server on the Internet, type the FQDN of the server, such as
http://megasolutions.net For a server on the local network, type
the computer name, such as WEBSVR87. Port 80 is the default port for
connections. As necessary, you can provide the port to which you want to
connect. For example, if you want to connect to the server on port 8080, you
would follow the server name by :8080, such as WEBSVR87:8080.
|
3.
|
After you type the server name (and optionally the port
number), click Next. IIS Manager will then try to use your current user
credentials to log on to the server. If this fails, you'll need to provide the
appropriate credentials on the presented Provide Credentials page before
clicking Next to continue. Click Finish to complete the connection.
|
You can connect to a specific Web site on
a designated server by following these steps:
1.
|
In Internet Information Services (IIS) Manager, click Start
Page in the console tree and then click Connect To A Site. This starts the
Connect To A Site Wizard.
|
2.
|
Type or select the server name in the Server Name box, such as
TESTSVR22. In the Site Name box, type or select the name of the Web site to
which you want to connect, such as Default Web Site.
|
3.
|
Click Next. IIS Manager will then try to use your current user
credentials to log on to the server. If this fails, you'll need to provide the
appropriate credentials on the presented Provide Credentials page before
clicking Next to continue. Click Finish to complete the connection.
|
You can connect to a specific
application on a designated site and server by following these steps:
1.
|
In Internet Information Services (IIS) Manager, click Start
Page in the console tree and then click Connect To An Application. This starts
the Connect To An Application Wizard.
|
2.
|
Type or select the server name in the Server Name box, such as
TESTSVR22. In the Site Name box, type or select the name of the Web site to
which you want to connect, such as Default Web Site.
|
3.
|
In the Application Name box, type or select the relative path
of the Web application to which you want to connect, such as /MyApplication or
/Apps/Myapp.
|
4.
|
Click Next. IIS Manager will then try to use your current user
credentials to log on to the server. If this fails, you'll need to provide the
appropriate credentials on the presented Provide Credentials page before
clicking Next to continue. Click Finish to complete the connection.
|
As
Figure 1-2 shows,
IIS Manager has been completely redesigned for IIS 7.0. Instead of being a
snap-in for the Microsoft Management Console, IIS Manager is now a stand-alone
application with a browser-like interface. Once you connect to a server, site,
or application, IIS Manager automatically connects to these installations upon
startup.
Figure 1-2. IIS Manager has a completely redesigned
interface in IIS 7.0.
IIS 7.0 introduces the concept of
delegated administration. With delegated administration,
a machine administrator can delegate administrative control safely and
securely. Delegated administration allows different levels of the configuration
hierarchy to be managed by other users, such as site administrators or
application developers. In a standard configuration, the default delegation
state limits write access to most configuration settings to machine
administrators only, and you must explicitly modify the delegation settings to
grant write access to others.
IIS Manager and other graphical tools provide just
about everything you need to work with IIS 7.0. Still, there are times when you
might want to work from the command line, especially if you want to automate
installation or administration tasks. To help you with all your command-line
needs, IIS 7.0 includes the IIS command-line administration tool (AppCmd.exe).
AppCmd.exe is located in the %SystemRoot%\System32\Inetsrv
directory. By default, this directory is not in your command path. Because of
this, you'll need either to add this directory to the default path or change to
this directory each time you want to use this tool. Add this directory
temporarily to your default path by typing the following at an elevated command
prompt:
path %PATH%;%SystemRoot%\System32\inetsrv
Then
add this directory permanently to your default path by typing the following at
an elevated command prompt:
setx PATH %PATH%;%SystemRoot%\System32\inetsrv
Note
You use Path to temporarily update
the command path for the current window. You use SETX PATH to permanently
update the command path for future command windows.
Table 1-3
provides a summary of the core set of administration objects for the IIS
command-line administration tool.
Table 1-3. Administration Objects for the IIS
Command-Line Administration Tool
|
Object Type | Description | Related Commands |
| APP |
Allows
you to create and manage Web application settings by using related list, set,
add, and delete commands |
list,
set, add, and delete |
| APPPOOL |
Allows
you to create and manage application pools by using related list, set, add,
delete, start, stop, and recycle commands |
list, set, add,
delete, start, stop, and recycle |
| BACKUP |
Allows
you to create and manage backups of your server configuration by using list,
add, delete, and restore commands |
list, add, delete,
and restore |
| CONFIG |
Allows
you to manage general configuration settings by using related list, set,
search, lock, unlock, clear, reset, and migrate commands |
list, set, search,
lock, unlock, clear, reset, and migrate |
| MODULE |
Allows
you to manage IIS modules by using related list, set, add, delete, install, and
uninstall commands |
list, set, add,
delete, install, and uninstall |
| REQUEST |
Allows
you to list current HTTP requests by using a related list command |
list |
| SITE |
Allows
you to create and manage virtual sites by using related list, set, add, delete,
start, and stop commands |
list, set, add,
delete, start, and stop |
| TRACE |
Allows
you to manage failed request tracing by using related list, configure, and
inspect commands |
list, configure,
and inspect |
| VDIR |
Allows
you to create and manage virtual directory settings by using related list, set,
add, and delete commands |
list, set, add, and
delete |
| WP |
Allows
you to list running worker processes by using a related list command |
list |
The
basics of working with the IIS command-line administration tool are
straightforward. Most administration objects support these basic commands:
-
ADD Creates
a new object with the properties you specify.
-
DELETE
Deletes the object you specify.
-
LIST
Displays a list of related objects. Optionally, you can specify a unique object
to list, or you can type one or more parameters to match against object
properties.
-
SET Sets parameters on the
object specified.
Some objects support other commands, including:
-
RECYCLE
Recycles the object you specify by deleting it and then re-creating it
-
START Starts the object you
specify if it is stopped
-
STOP
Stops the object you specify if it is started or otherwise active
To type commands, use the following basic syntax:
appcmd Command <Object-type>
where Command
is the action to perform, such as list, add, or delete, and Object-type is the
object on which you want to perform the action, such as app, site, or vdir.
Following this, if you wanted to list the configured sites on a server, you
could type the following command at an elevated command prompt:
Because the IIS command-line
administration tool will also accept plural forms of object names, such as
apps, sites, or vdirs, you could also use:
In either case, the resulting output
is a list of all configured sites on the server with their related properties,
such as:
SITE "Default Web Site" (id:1,bindings:http/*:80:,state:Started)
|