I've got an IIS server that is running a bit low on diskspace on the C: drive; I've moved the W3SVC logs from c:\windows\system32\LogFiles to another drive, but there is also a big HTTPERR folder there that I'd like to move somewhere else. How do I do it?


Microsoft have details here but the summary is:

Go into the registry and amend HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters Create a String called ErrorLoggingDir and point that somewhere else. Don't include the HTTPERR path, as the HTTP service will create an HTTPERR subdirectory anyway.

Then you restart the HTTP service (net stop HTTP, net start HTTP) and then start any dependent services - eg W3SVC. The HTTP service (http.sys) does not appear in the services MMC, so you have to use a command line to start/stop it.


Here is some powershell code that will add the registry key:

$myRegKeyBase = "HKLM:\SYSTEM\CurrentControlSet\services\HTTP\Parameters" $myRegKeyName = "ErrorLoggingDir" $myRegKeyVal = "D:\inetpub\logs" # Create Key property if it doesn't already exist $myRC = New-ItemProperty $myRegKeyBase -Name $myRegKeyName -Value $myRegKeyVal -PropertyType String -ErrorAction SilentlyContinue # Update Key property to $iisLogFileDir if it already exists Set-ItemProperty $myRegKeyBase -Name $myRegKeyName -Value $myRegKeyVal -ErrorAction SilentlyContinue $myProperties = Get-ItemProperty $myRegKeyBase -ErrorAction SilentlyContinue Write-Host "regKeyPath: $($myRegKeyBase) regKeyName: $($myRegKeyName) value: $($myProperties.$myRegKeyName)"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.