Server-level administration involves the following tasks:
Connecting to a machine running IIS to administer that machine
Backing up and restoring the configuration of the machine
Enabling global bandwidth throttling for all Web and FTP sites on the machine
Configuring various master properties that apply globally to all Web and FTP sites created on the machine
Compressing files by using HTTP compression
Configuring the global Multipurpose Internet Mail Extensions (MIME) map
Setting server extensions (if you have Microsoft FrontPage server extensions installed)
Connecting to an IIS Server
You can
administer multiple servers running Windows Server 2003 and IIS from a
single IIS console window. To administer a server, you need to connect
to it first. To do so, follow these steps:
1. | Start the Manage Your Server application from the Start Menu.
|
2. | Select Manage this application server from the options available under the Application Server heading.
|
3. | The
Application Server console window will appear. Select the root node
(called Internet Information Services) in the IIS console tree.
|
4. | Click
Action on the toolbar and choose Connect from the drop-down menu, or
right-click the root node and choose Connect from the shortcut menu.
(Remember that in a console window, the drop-down Action menu provides
the same options as the shortcut menu that is displayed when you
right-click any selected node.)
|
5. | In
the Connect To Computer dialog box, type the name of the IIS machine to
which you want to connect in the text box, and click OK. You can
specify the name of the machine as any of the following:
- Network Basic Input/Output System (NetBIOS) name (for instance, the name “server”)
- Internet Protocol (IP) address (for instance, 192.168.1.128)
- Fully qualified DNS name (for instance, server.example.com)
|
6. | To
disconnect from a server, select the node in the console tree that
represents the server, click Action, and choose Disconnect.
|
Creating Configuration Backups
You can
save the configuration settings for an IIS machine and all of its Web
and FTP sites to a configuration backup file. Each backup file is
stamped with a version number and its time and date of creation. You can
create any number of backup files and restore these files if you want
to restore your previous settings. This feature is quite useful—it
allows you to take a snapshot of your IIS configuration before you start
modifying permissions and other settings for the virtual servers,
directories, and files on your machine.
Note
Configuration backup
files restore only the IIS settings on your machine’s Web and FTP sites
and their virtual and physical directories and files. They don’t back up
the actual content files themselves—that is, the HTML, images, and
scripts within a Web site. Use the utilities provided by Windows, such
as the Backup or Restore Wizard, to back up the content files for your
sites.
Backing Up a Server Configuration
To back up the configuration of your IIS machine, follow these steps:
1. | Select the node in the console tree that represents your server.
|
2. | Click Action, point to the All Tasks menu item, and when it is revealed, choose the Backup/Restore Configuration menu item.
|
3. | As Figure 1
shows, the Configuration Backup/Restore dialog box that appears
displays the various backup files you created, their version numbers,
and date/time of creation. Version numbers start with zero and increase
sequentially.
|
4. | To
create a new backup file, click Create Backup and give the file a
friendly name. The backup file is saved in the System32\inetsrv\MetaBack
directory. The information is stored in binary format and is specific
to the machine on which it has been created. If you reinstall Windows
Server 2003 on the machine, you’ll be unable to use previously created
backup files to re-create your IIS configuration.
|
You can provide a
password to encrypt the backup. You can read the backup information
because only the secure properties are encrypted. Without the correct
password, however, you are not able to restore the system with the
backup files.
Restoring a Server Configuration
To restore the
configuration of your server to a previous version, open the
Configuration Backup/Restore dialog box, select the backup file you want
to restore to, and click Restore. Note that IIS must stop its services
to perform a restore, so a restore takes longer than a backup.
Note
You can export the
contents of the rightmost pane of the console window by selecting a
particular node in the leftmost pane, clicking Action, and choosing
Export List. You can save the information as an ASCII or Unicode text
file in either tab-delimited format or comma-delimited format. This is a
great way to document home directories for the various virtual
directories you create within a Web site.
Configuring Server Properties
Server-level
properties for the WWW service are configured using the properties of
the Web Sites node in IIS Manager.
The
configuration of IIS is stored in what’s called the metabase. The
metabase is a plain text file in XML (Extensible Markup Language) format
named Metabase.xml. This file is in your system32\inetsrv directory.
Metabase.xml is tied to a file called MBschema.xml that defines the
schema of the metabase. It defines properties and specifies what
properties can be written to what keys in the metabase configuration.
Editing the Metabase
Making the metabase a
plain text file enables easy editing and viewing of your settings. You
can edit the file in a text editor such as Notepad. You can view the
file in a program that can render XML, such as Microsoft Internet
Explorer.
You can change the
configuration of your server without having to stop IIS. If you
right-click the server node and select the Properties menu item, you can
select the Enable Direct Metabase Edit option, which is shown in Figure 2.
The metabase schema
consists of containers called collections. Each collection exists at the
same hierarchical level; no collection can be contained in another
collection.
Properties represent a configurable facet of IIS. The IISConfigObject collection contains all properties in the metabase. Each property consists of ID, Type, UserType, Attributes, and Default Value. Some properties have other attributes; these include MetaFlags, MetaFlagsEx, StartingNumber, and EndingNumber.
Metabase History
If
you have a basic grasp of the layout of the metabase file and a working
knowledge of XML, you can begin to change the contents of the metabase.
As you edit the metabase, the metabase history feature provides a level
of safety. Changes are saved to disk in the system32\inetsrv\history
directory.
By default, 10 metabase
pairs (Metabase.xml and MBSchema.xml) are maintained in the history
folder. If a new pair is being written and the history folder already
contains 10 pairs, the oldest pair is deleted. The default number of
versioned history pairs can be changed by editing the MaxHistoryFiles property.