Share via


Saving Log Files

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1

By default, IIS creates a new log file for each Web site in the systemroot\System32\LogFiles directory. However, you can specify the directory into which log files are saved, and you can determine when new log files are started. To protect logged data, set appropriate Access Control with IIS 6.0 on the log file directory. Consider allowing only the administrator and the IIS_WPG group to have access to the log file directory.

Important

You must be a member of the Administrators group on the local computer to perform the following procedure or procedures. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run IIS Manager as an administrator. At a command prompt, type runas /user:Administrative_AccountName "mmc %systemroot%\system32\inetsrv\iis.msc".

Procedures

To set options for saving log files

  1. In IIS Manager, expand the local computer, expand the Web or FTP Sites directory, right-click the Web or FTP site, and click Properties.

  2. On the Web Site or FTP Site tab, click Properties next to the Active log format list box.

  3. Select the log schedule to use when starting a new log file.

    Note

    "Midnight" is midnight local time for all log file formats except the W3C Extended format. For W3C Extended log file format, "midnight" is midnight Greenwich Mean Time (GMT), by default, but can be changed to midnight local time. To open new W3C Extended logs using local time, select the Use local time for file naming and rollover check box. The new log starts at midnight local time, but the time recorded in the log files is still GMT.

  4. Under Log file directory, type the directory where log files should be saved. For information about saving log files on a remote share, see Remote Logging.

  5. Click Apply, and then click OK twice.