Managing Web Site Properties


The sections that follow examine key tasks for managing Web site properties. You configure most Web site properties through the Web site’s Properties dialog box.

Configuring a Site’s Home Directory

Each Web site on a server has a home directory. The home directory is the base directory for all documents that the site publishes. It contains a home page that links to other pages in your site. The home directory is mapped to your site’s domain name or to the server name. For example, if the site’s DNS name is www.microsoft.com and the home directory is C:\Inetpub\Wwwroot, then browsers use the URL http://www.microsoft.com/ to access files in the home directory. On an intranet, the server name can be used to access documents in the home directory. For example, if the server name is CorpIntranet, then browsers use the URL http://CorpIntranet/ to access files in the home directory.

You can view or change a site’s home directory by completing the following steps:

  1. Start the IIS snap-in and then, in the left pane (Console Root), click the plus sign (+) next to the computer you want to work with. If the computer isn’t shown, connect to it as discussed in the “Connecting to Other Servers” section of Chapter 2.

  2. Double-click Web Sites. Right-click the Web site you want to manage and then choose Properties.

  3. Select the Home Directory tab, as shown in Figure 3-7.

  4. If the directory you want to use is on the local computer, select A Directory Located On This Computer, and then type the directory path in the Local Path text box, such as C:\Inetpub\Wwwroot. To browse for the folder, click Browse.

  5. If the directory you want to use is on another computer and is accessible as a shared folder, select A Share Located On Another Computer, and then type the UNC path to the share in the Network Directory field. The path should be in the form \\ServerName\SharedFolder, such as \\Gandolf\CorpWWW. Then click Connect As and type the user name and password that should be used to connect to the shared folder.

    click to expand
    Figure 3-7: You can change a site’s home directory at any time.

    Note

    If you don’t specify a user name and password, the user's Windows credentials are authenticated before allowing access. If this is an anonymous access site, the Users group should have access to the shared folder. Otherwise, the network connection to the folder will fail. See the section entitled “Working with File and Folder Permissions” in Chapter 7, “Enhancing Web Server Security,” for more details on access permissions.

  6. If you want to redirect users to another URL, select A Redirection To A URL, and then follow the techniques outlined in the “Redirecting Browser Requests” section of Chapter 4.

  7. Click OK.

Configuring Ports, IP Addresses, and Host Names Used by Web Sites

Each Web site has a unique identity. The identity includes TCP port, SSL port, IP address, and host name settings. The default TCP port is 80. The default SSL port is 443. The default IP address setting is to use any available IP address.

To change the identity of a Web site, complete the following steps:

  1. If you want the Web site to respond to a specific IP address, you must configure the IP address before updating the site. For details, refer to the “Configuring Static IP Addresses” section of Chapter 16, “Managing TCP/IP Networking,” in Microsoft Windows Server 2003 Administrator’s Pocket Consultant.

  2. Start the IIS snap-in and then, in the left pane (Console Root), click the plus sign (+) next to the computer you want to work with. If the computer isn’t shown, connect to it as discussed in the “Connecting to Other Servers” section of Chapter 2.

  3. Double-click Web Sites. Right-click the Web site you want to manage and then choose Properties. The dialog box shown in Figure 3-8 is displayed.

    click to expand
    Figure 3-8: You modify a site’s identity through the Web Site tab in the Properties dialog box.

  4. The Description text box shows the descriptive name for the Web site. The descriptive name is displayed in the IIS snap-in and isn’t used for other purposes. You can change the current value by typing a new name in the Description text box.

  5. The IP address drop-down list shows the current IP address for the Web site. If you want to change the IP address, use the drop-down list to select an available IP address or choose (All Unassigned) to allow HTTP to respond on all unassigned IP addresses. Multiple Web sites can use the same IP address, provided that the sites are configured to use different port numbers or host header names.

  6. The TCP port for the Web site is assigned to port 80 automatically. If necessary, type a new port number in the TCP Port field. Multiple Web sites can use the same TCP port, provided that the sites are configured to use different IP addresses or host header names.

  7. If you plan to use host headers for the site, click Advanced, then Add, and finally type the host header name in the Host Header Value text box. On a private network, the host header can be a computer name, such as EngIntranet. On a public network, the host header must be a DNS name, such as services.microsoft.com. The host header name must be unique.

  8. By default, Web servers use port 443 for SSL. If you’ve installed an SSL certificate on the server as discussed in Chapter 8, “Managing Microsoft Certificate Services and SSL,” SSL is enabled for use, and you can change the SSL port by typing a new value in the SSL Port field. Multiple sites can use the same SSL port, provided that the sites are configured to use different IP addresses.

  9. Click OK.

Configuring Multiple Identities for a Single Web Site

Throughout this chapter I’ve discussed techniques you can use to configure multiple Web sites on a single server. The focus of the discussion has been on configuring unique identities for each site. In some instances you might want a single Web site to have multiple domain names associated with it. A Web site with multiple domain names publishes the same content for different sets of users. For example, your company might have registered example.com, example.org, and example.net with a domain registrar to protect your company or domain name. Rather than publishing the same content to each of these sites separately, you can publish the content to a single site that accepts requests for each of these identities.

The rules regarding unique combinations of ports, IP addresses, and host names still apply to sites with multiple identities. This means that each identity for a site must be unique. You accomplish this by assigning each identity unique IP address, port, or host header name combinations.

To assign multiple identities to a Web site, complete the following steps:

  1. If you want the Web site to use multiple IP addresses, you must configure the additional IP addresses before modifying the site properties. For details, refer to the “Configuring Static IP Addresses” section of Chapter 16, “Managing TCP/IP Networking,” in Microsoft Windows Server 2003 Administrator’s Pocket Consultant.

  2. Start the IIS snap-in and then, in the left pane (Console Root), click the plus sign (+) next to the computer you want to work with. If the computer isn’t shown, connect to it as discussed in the “Connecting to Other Servers” section of Chapter 2.

  3. Double-click Web Sites. Right-click the Web site you want to manage and then choose Properties. The dialog box shown previously in Figure 3-8 is displayed.

  4. In the Web Site tab, click Advanced. As Figure 3-9 shows, you can now use the Advanced Web Site Configuration dialog box to configure multiple identities for the site.

    click to expand
    Figure 3-9: Web sites can have multiple identities.

  5. Use the Multiple Identities For This Web Site frame to manage the following TCP port settings:

    • Add Adds a new identity. Click Add, select the IP address you want to use, and then type a TCP port and optional host header name. Click OK when you’re finished.

    • Edit Allows you to edit the currently selected entry in the identities frame.

    • Remove Allows you to remove the currently selected entry from the identities frame.

  6. Use the Multiple SSL Identities For This Web Site frame to manage SSL port settings. Click Add to create new entries. Use Edit or Remove to modify or delete existing entries.

  7. Click OK twice to return to the IIS snap-in.

Restricting Incoming Connections and Setting Time-Out Values

You control incoming connections to a Web site in two key ways. You can set a limit on the number of simultaneous connections, and you can set a connection time-out value.

Normally, Web sites accept an unlimited number of connections, and this is an optimal setting in most environments. However, a large number of connections will cause the Web site to slow down—sometimes so severely that nobody can access the site. To avoid this situation, you might want to limit the number of simultaneous connections. Once the limit is reached, no other clients are permitted to access the server. New clients must wait until the connection load on the server decreases; however, currently connected users are allowed to continue browsing the site.

The connection time-out value determines when idle user sessions are disconnected. With the default Web site, sessions time out after they’ve been idle for 120 seconds (2 minutes). This prevents connections from remaining open indefinitely if browsers don’t close them correctly.

You can modify connection limits and time-outs by completing the following steps:

  1. Start the IIS snap-in and then, in the left pane (Console Root), click the plus sign (+) next to the computer you want to work with. If the computer isn’t shown, connect to it as discussed in the “Connecting to Other Servers” section of Chapter 2.

  2. Double-click Web Sites. Right-click the Web site you want to manage and then choose Properties.

  3. The Connection Timeout field, located in the Web Site tab of the Properties dialog box, controls the connection time-out. Type a new value to change the current time-out.

  4. Select the Performance tab. To remove connection limits, select Unlimited in the Web Site Connections frame. To set a connection limit, select Connections Limited To, and then type a limit.

  5. Click OK.

Configuring HTTP Keep-Alives

The original design of HTTP opened a new connection for every file retrieved from a Web server. Because a connection isn’t maintained, no system resources are used after the transaction is completed. The drawback to this design is that when the same client requests additional data, the connection must be reestablished, and this means additional traffic and delays.

Consider a standard Web page that contains a main HTML document and 10 images. With standard HTTP, a Web client requests each file through a separate connection. The client connects to the server, requests the document file, gets a response, and then disconnects. The client repeats this process for each image file in the document.

Web servers compliant with HTTP 1.1 support a feature called HTTP Keep- Alives. With this feature enabled, clients maintain an open connection with the Web server rather than reopening a connection with each request. HTTP Keep- Alives are enabled by default for new Web sites. In most situations clients will see greatly improved performance with HTTP Keep-Alives enabled. Keep in mind, however, that maintaining connections requires system resources. The more open connections there are, the more system resources that are used. To prevent a busy server from getting bogged down by a large number of open connections, you might want to limit the number of connections, reduce the connection time-out for client sessions, or both. For more information on managing connections, see the “Restricting Incoming Connections and Setting Time- Out Values” section of this chapter.

To enable or disable HTTP Keep-Alives, follow these steps:

  1. Start the IIS snap-in and then, in the left pane (Console Root), click the plus sign (+) next to the computer you want to work with. If the computer isn’t shown, connect to it as discussed in the “Connecting to Other Servers” section of Chapter 2.

  2. Double-click Web Sites. Right-click the Web site you want to manage and then choose Properties.

  3. In the Web Site tab of the Properties dialog box, select Enable HTTP Keep- Alives to enable HTTP Keep-Alives. Clear this check box to disable HTTP Keep-Alives.

  4. Click OK.




Microsoft IIS 6.0Administrator's Consultant
Microsoft IIS 6.0Administrator's Consultant
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 116

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net