hide random home http://www.microsoft.com/infoserv/docs/DIRS.HTM (PC Press Internet CD, 03/1996)

CHAPTER 6

Planning Your Content Directories and Virtual Servers

This chapter explains how to:

See the Chapter 5, "Securing Your Site Against Intruders," for more information about security and about using the Windows NT File System (NTFS) with your directories.


Configuring a Single Content Directory

If your HyperText Markup Language (HTML) content files are contained under one directory tree, all you need to do is copy them to the default World Wide Web (WWW) home directory (\Wwwroot) or change the home directory to refer to the location containing your files. However, if your files reside in multiple directories, or even multiple computers on your network, you will need to create virtual directories to make those files available.


Setting the Default Document and Directory Browsing

If a remote user sends a request without a specific file name (for example, http://www.microsoft.com/), the WWW service will return the specified default document, if it exists in that directory. You can place a file with the specified default document filename in each subdirectory.

[DIRS103B  13838 bytes ]

If no default document is available, the server will return an error, unless directory browsing is enabled. If directory browsing is enabled, a directory listing containing links to the files and directories in that directory will appear (see the following graphic).

A default document can be included in all WWW directories. In the Directories property sheet for the WWW service, change the Default Document entry to the default file name you will use on your system. Often the default document is set to be an index file (Index.htm) for the contents of that directory (or of the entire server). The default file name used is Default.htm.

If the user does not specify a file for a particular directory, a hypertext file and directory listing will be returned.

[DIRS103C  9293 bytes ]

Directory browsing on the WWW service is very similar to browsing in File Tranfer Protocol (FTP). Directory browsing is useful if you have a lot of files that you want to share quickly without converting them to HTML format.


Note

To browse virtual directories, the Uniform Resource Locator (URL) for the virtual directory must be specified. This can be done either by clicking a hypertext link containing the URL, or by typing the URL in the Location box of the browser.



Creating Virtual Servers

By convention each domain name, such as www.company.com, represents an individual computer. However, it is possible to use a single computer and make it appear to be not only a primary server (for example, named www.company.com), but also servers for different departments of your company (for example, marketing.company.com, sales.company.com, and so on). You can create "virtual servers" for these departments with Microsoft Internet Information Server. You do not need a different computer for each domain name.

To do this, you must obtain Internet Protocol (IP) addresses from your Internet Service Provider (ISP) for the primary server and for each virtual server you want to create. For example, you assign the first IP address (10.212.56.184) in the Domain Name System (DNS) as www.company.com (your primary server), and assign C:\Wwwroot as its content home directory. You register the second IP address (10.212.56.185) in DNS as marketing.company.com, and assign a different drive or directory as its content home directory. Thus, it appears to users on the Internet that there are two computers when in fact it is the same computer running one copy of the WWW service. If you create a home directory without specifying an IP address, that home directory will be used for all requests containing server IP addresses not specified in other home directories.

[DIRS103D  9029 bytes ]

You use the Network applet in the Windows NT Control Panel to bind the additional IP addresses to your network adapter card.

After the IP address is assigned to the network adapter card, you must assign a home content directory to that IP address. In the Directories property sheet, select the Virtual Server box and enter its IP address. Virtual directories (directories that are not home directories) can also be restricted to one virtual server by assigning an IP address to them.

[DIRS103E  11038 bytes ]

To create more than five virtual servers you must change a Windows NT Registry entry. See Help to learn how to create more than five virtual servers.

Specifying Directories with Virtual Servers

If you have assigned more than one IP address to your server, when you create a directory you must specify which IP address has access to that directory. If no IP address is specified, that directory will be visible to all virtual servers.


Important

The default directories created during setup do not specify an IP address. You may need to specify IP addresses for the default directories when you add virtual servers.


Directory

To specify the fully qualified path for the directory to use for the selected virtual server, choose the Add button and type the path in the Directory box of the Directory Properties dialog box, or use the Browse button to pick the directory to use.


Configuring Content Directories

If your site is complex, you can configure Internet Information Server to publish from multiple directories in your service by using Internet Service Manager. The Directories property sheet lists the content directories used by the WWW service.

[DIRS103F  11038 bytes ]

Directory lists the physical location of the directory.
Alias is the path for information service users.
Address
lists the IP address of virtual servers assigned to that directory.
Error indicates any error status.

Click the Add button or the Edit Properties button in the Directories property sheet to configure individual WWW service directories.

[DIRS103G  7853 bytes ]

Home Directory

Every server must have a home directory for content files. The home directory is the "root" directory for that service. As a root directory it does not have a name. By default, the home directory and all subdirectories are available to users.

Virtual Directory

Choose this to specify additional directories that will appear as subdirectories of the root of the WWW service.

For example, if you want to provide three different product catalogs, each catalog could be stored on a separate hard drive on the server www.company.com.

[DIRS103H  10600 bytes ]

Virtual directories can be used to present three separate drives as three subdirectories.

[DIRS103I  9272 bytes ]

To browsers, virtual directories appear as subdirectories off the "root" home directory. You must provide the name (alias) that browsers will use to specify that directory.

[DIRS103J  9565 bytes ]

You can create an almost unlimited number of virtual directories for your service, although performance may suffer if you create too many of them. Use them only as required.


Note

To browse virtual directories, the Uniform Resource Locator (URL) for the virtual directory must be specified. This can be done either by clicking a hypertext link containing the URL, or by typing the URL in the Location box of the browser.


Specifying Directories with Virtual Servers

If you have assigned more than one IP address to your server, when you create a directory you must specify which IP address has access to that directory. If no IP address is specified, that directory will be visible to all virtual servers.


Important

The default directories created during setup do not specify an IP address. You may need to specify IP addresses for the default directories when you add virtual servers.


Account Information

This entry applies only if the physical directory is listed by using a Universal Naming Convention (UNC) path, such as \\Research4\Public\WWWfiles. Enter a username and password with permission to use the network directory share.

Access Check Boxes

Read must be selected for content directories.

Write must be selected for directories that will accept data from users. Assign Write access cautiously to prevent unauthorized users from placing malicious files on your computer.

Execute must be selected for directories containing programs, scripts, and Internet Server API (ISAPI) applications. Ensure that any directory marked Execute is not also marked Write; (this will prevent malicious programs from being copied to your server and then started, causing damage to your system. Also, ensure that any directory marked Execute is not also marked Read; this will prevent users from seeing your interactive content files.

Require secure SSL channel must be selected to require encrypted communication for a directory. For more information on Secure Sockets Layer (SSL), see Chapter 5, "Securing Your Site Against Intruders."


Previous Next

Home Detailed Contents

© 1996 by Microsoft Corporation. All rights reserved..