Configure a Web Server to Serve Content (IIS 7)

Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista

In IIS 7, you can create sites, applications, and virtual directories to share information with users over the Internet, an intranet, or an extranet. Sites, applications, and virtual directories work together in a hierarchical relationship as the basic building blocks for hosting online content.

Briefly, a site contains one or more applications, an application contains one or more virtual directories, and a virtual directory maps to a physical directory on a Web server. Each of these three concepts is discussed in additional detail in the following sections.

This section includes:

  • Sites

  • Applications

  • Virtual Directories

Sites

A site is a container for Web applications, and you can access it through one or more unique bindings. A Web site binding is the combination of an IP address, a port, and the optional host headers on which HTTP.sys listens for requests made to that Web site. For more information about sites, see Managing Sites in IIS 7.

Applications

An application is a software program that runs in an application pool and that delivers Web content, usually in HTML, to users over the HTTP protocol. When you create an application, the application's name becomes part of the site's URL that users can request from a Web browser.

In IIS 7, each site must have an application called the root application, or default application. However, a site can have more than one application. For example, you might have an online commerce site that has several applications, such as a shopping cart application that lets users gather items during shopping and a logon application that lets users to recall saved payment information when they make a purchase.

For more information about applications, see Managing Applications in IIS 7.

Virtual Directories

A virtual directory is a directory name that you specify in IIS and map to a physical directory on a local or remote server. The directory name then becomes part of the application's URL, and users can request the URL from a Web browser to access content in the physical directory, such as a Web page or a list of additional directories and files. If you specify a different name for the virtual directory than the physical directory, it is more difficult for users to discover the actual physical file structure on your server because the URL does not map to the root of the site.

In IIS 7, each application must have a virtual directory, which is named the root virtual directory, and which maps the application to the physical directory that contains the application's content. However, an application can have more than one virtual directory. For example, you might use a virtual directory when you want your application to include images from another location in the file system, but you do not want to move the image files into the physical directory that is mapped to the application's root virtual directory.

For more information about virtual directories, see Managing Virtual Directories in IIS 7.