Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update iis.md #1220

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions docs/general/networking/iis.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ IIS with default selections + Application Development->WebSocket Protocol (minim
```powershell
Set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter "system.webServer/proxy" -name "enabled" -value "True"
Set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter "system.webServer/proxy/cache" -name "enabled" -value "False"
Set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter "system.webServer/proxy" -name "httpVersion" -value "Http11"
Set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter "system.webServer/proxy" -name "preserveHostHeader" -value "True"
Add-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter "system.webServer/rewrite/allowedServerVariables" -name "." -value @{name='HTTP_X_FORWARDED_PROTOCOL'}
Add-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter "system.webServer/rewrite/allowedServerVariables" -name "." -value @{name='HTTP_X_FORWARDED_PROTO'}
Expand All @@ -29,6 +28,12 @@ Add-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter "system.
Add-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter "system.webServer/rewrite/allowedServerVariables" -name "." -value @{name='HTTP_X_FORWARDED_PORT'}
```

Long running streams may freeze due to limits within IIS, the following (powershell) command resolves it.

```powershell
Set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter "system.applicationHost/webLimits" -name "minBytesPerSecond" -value 25
```

## web.config

```config
Expand Down Expand Up @@ -88,18 +93,18 @@ Add-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter "system.
<action type="Rewrite" url="http://localhost:8096/{R:0}" logRewrittenUrl="true" />
</rule>
</rules>
<outboundRules><!-- Add Cache -->
<outboundRules><!-- Add Cache -->
<rule name="Add Cache" preCondition="images" enabled="true" patternSyntax="ECMAScript">
<match serverVariable="RESPONSE_Cache_Control" pattern="(.*)" />
<action type="Rewrite" value="max-age=604800" />
</rule>
<preConditions><!-- Pre-Condition for images -->
<preCondition name="images" logicalGrouping="MatchAny">
<preConditions><!-- Pre-Condition for images -->
<preCondition name="images" logicalGrouping="MatchAny">
<add input="{REQUEST_URI}" pattern="Items/.+/Images/.*" />
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^image/.+" />
</preCondition>
</preConditions>
</outboundRules>
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
<caching enabled="false" enableKernelCache="false" />
<httpProtocol>
Expand Down
Loading