UEU-co logo


Previous Page Next Page

Adding a Website

To open the IIS Manager, select Start, Administrative Tools, and then Internet Information Services (IIS) Manager (or you can expand the Roles node in the Server Manager to access the IIS Manager). When the Start Page node is selected in the snap-in, you can view recent connections, access connection tasks, and also access online resources related to IIS.

When you expand the Web Server node (which is really the localhost node) and then expand the Sites node, you can view the sites currently on the server. If you haven’t added any sites (or upgraded a web server running an earlier version of Windows server such as Windows Server 2003), only the new Default Web Site is listed in the Sites pane (see Figure 23.6).

Figure 23.6. List the sites currently on the web server.

[View full size image]

You can use the Default Web Site as the site on the web server if you wish. You can rename the site as needed (right-click the site and select Rename). When you install the IIS services on your server, a default folder, InetpubWwwroot, is created on your system drive for the Default Web Site. You can use this folder as the location for your published web content or you can create another location for your web content (you can specify a different drive and folder on the server for the Default Web Site).

An alternative to using the Default Web Site is to create a new site, which we do in a moment. In terms of configuration websites (site configuration is discussed later in the hour), there are really two configuration layers related to your websites. There are settings that affect all the websites created on the IIS server, and then there are configuration settings for each website that you create.

Let’s take a look at adding a website, and then we can examine the configuration options provided by the IIS Manager. To add a website to the server, follow these steps:

1. In the IIS Manager (in the MMC or Server Manager), click the Sites node in the node tree and then click Add Web Site in the Actions pane. The Add Web Site dialog box opens (see Figure 23.7).

Figure 23.7. Add a website to the IIS server.

2. In the Site Name box type a unique, friendly name for the site. As you type the name, an application pool for the site is created with the same name as the site (the pool name uses a maximum of 64 characters). The application pool is configured to use the .NET Framework by default and can be edited after the site has been created.

Did you Know?

You can change site settings after you create the site. This includes the site friendly name, the content path, and other site settings.

3. In the Physical Path box, type the path where you want to store the site content. The path can be on the local server or you can specify a remote share, using the UNC naming connections ServerShare. If you wish to browse for the path, click the Browse for Folder button.

4. By default the server uses pass-through authentication as the connection method to the physical path that you supplied in step 3. This means that the server uses the credentials of the requesting user to access the physical path. This authentication type provides access to both credentialed users and anonymous requests. You can test your connection settings (to the physical path) by clicking the Test Settings button.

By the Way

If you want to limit connection to the path to a specific user, you can click the Connect As button. You can then use the Connect As dialog box to specify that username and password.

5. In the Binding area of the Add Web Site dialog box, you set the protocol type, the IP address, and the port. For the Type, set HTTP (the default) or HTTPS in the drop-down box.

6. In the IP Address box, select an IP address for the site in the drop-down list or type an IP address. You can use IPv4 or IPv6 addressing.

7. In the Port box, provide the port number that the IIS server will use to listen for connection requests to the site. Port 80 is the default for HTTP (HTTPS uses port 443 as the default). You should probably go with the defaults.

8. If you want to have web clients connect to the site by hostname (domain name), provide the hostname for the site (such as www.sitename.com). If you specify a site name, the web clients attempting to connect to the site need to use the hostname rather than the IP address (which makes sense for public sites available on the Web).

9. When you have supplied all the information for the new site in the Add Web Site dialog box, click OK. The Add Web Site dialog closes.

The new site will be added to the Sites list in the IIS Manager. You will get an error when you attempt to connect to the site until a default document is configured for the site. Adding pages to a site is discussed later in the hour.

By the Way

You can also provide access to the path for a site that does not contain a default document by enabling directory browsing on the IIS server. The directory browsing settings can be set on the Features page for the site. Click the site in the Connections node tree and then double-click Directory Browsing to open the Directory Browsing settings. We discuss setting features for a site later in the hour.

After you have created a new site or sites (this includes the default site if you plan on using it), you can set the configuration settings for all your sites and also fine-tune settings for specific sites. The following section discusses setting “global” settings for all the sites on your IIS server.

Previous Page Next Page

Leave a Reply

Time limit is exhausted. Please reload the CAPTCHA.


apply_now Pepperstone Group Limited