How do I configure IIS HTTP logging?


This article covers how to configure IIS to log the HTTP fields necessary for applications handling university data. The guidelines documented here meet the requirements outlined in IT Standards for Data Classifications.

For configurations not behind a load balancer, the X-Forwarded-For header may be omitted. 


Step 1

Open the IIS Manager applet and double click Logging. If you want to configure logging for one particular site and not all IIS sites, expand the Sites folder, click the desired site, and then double click Logging in the site home pane. Otherwise, proceed to step 2.

IIS home page


Step 2


Click "Select Fields".

Logging settings home

Step 3

Click "Add Field..."

Dialog to select logging fields

Step 5

Enter "X-Forwarded-For" in the Field Name text box.
Set the Source Type as Request Header.
Type "X-Forwarded-For" in the Source: field. Ignore the drop down option and type the field name in the text box.
Click OK

Enter X-Forwarded-For custom field

Step 6

Click "Add Field..." again to open the custom field dialog.

Enter "client-port" in the Field Name text box.
Set Source Type to Server Variable.
Click the Source dropdown and select REMOTE_PORT
Click OK.

Enter client port custom field

Step 8

Scroll down the list of Standard Fields until you see Bytes Sent and Bytes Received. Check box boxes. Click OK to save the logging configuration.

Logging fields with custom ones added

Step 9

Click Apply in the upper right corner, under Actions, to apply the changes.

IIS logs home

Print Article


Article ID: 1862
Thu 3/25/21 3:39 PM
Fri 3/22/24 4:11 PM

Related Articles (1)

Guidelines for configuring HTTP logging consistent with IT standards