Created
October 22, 2016 15:46
-
-
Save cakriwut/9b941c634bc5216c199aea0c8c379424 to your computer and use it in GitHub Desktop.
Complete Reverse proxy rule for SharePoint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration> | |
<system.serviceModel> | |
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /> | |
</system.serviceModel> | |
<system.webServer> | |
<modules runAllManagedModulesForAllRequests="true"> | |
<add name="CustomHttpModule" type="Custom.ServerModules.CustomHttpHeaderModule" /> | |
</modules> | |
<httpProtocol> | |
<customHeaders> | |
<clear /> | |
<remove name="X-Powered-By" /> | |
<add name="X-Frame-Options" value="SAMEORIGIN" /> | |
</customHeaders> | |
</httpProtocol> | |
<rewrite> | |
<rules> | |
<rule name="ReverseProxy" stopProcessing="true"> | |
<match url=".*" /> | |
<conditions logicalGrouping="MatchAll" trackAllCaptures="false"> | |
<add input="{HTTP_HOST}" pattern="portal.contoso.com" /> | |
</conditions> | |
<action type="Rewrite" url="http://internalserver:2000/{R:0}" /> | |
<serverVariables> | |
<set name="HTTP_X_ACCEPT_ENCODING" value="{HTTP_ACCEPT_ENCODING}" /> | |
<set name="HTTP_X_ORIGINAL_HOST" value="{HTTP_HOST}" /> | |
<set name="HTTP_ACCEPT_ENCODING" value=""/> | |
</serverVariables> | |
</rule> | |
</rules> | |
</rewrite> | |
</system.webServer> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment