12.13. Configuring Web Site Logging

Problem

You want to log visits to your web sites.

Solution

Using a graphical user interface

To enable logging for all web sites on the server, do the following:

  1. Open Internet Information Services (IIS) Manager.

  2. In the left pane, expand the console tree to display the Web Sites node, right-click on this node, and select Properties.

  3. Select the Web Site tab.

  4. Select the Enable logging checkbox.

  5. Select a log file format as desired (W3C Extended Log File Format is recommended).

To enable logging for an individual web site, do the following:

  1. Open Internet Information Services (IIS) Manager.

  2. In the left pane, expand the console tree to display your web site, right-click on the site, and select Properties.

  3. Select the Web Site tab.

  4. Select the Enable logging checkbox.

  5. Select a log file format as desired (W3C Extended Log File Format is recommended).

To enable or disable logging for content stored in your web site's home directory, do the following:

  1. Open Internet Information Services (IIS) Manager.

  2. In the left pane, expand the console tree to display your web site, right-click on the site, and select Properties.

  3. Select the Home Directory tab.

  4. Select or clear the Log visits checkbox as desired.

To enable or disable logging for content stored in a virtual directory:

  1. Open Internet Information Services (IIS) Manager.

  2. In the left pane, expand the console tree to display your web site, select a virtual directory within your site, right-click on the virtual directory, and select Properties ...

Get Windows Server Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.