mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-15 02:00:15 +00:00
Update reverse-proxy.md
Fixed the IIS reverse proxy configuration, not considering special characters, and added HTTP_X_FORWARDED headers. Signed-off-by: Luotio <juha@luotio.net>
This commit is contained in:
parent
44a86d664c
commit
38e2d51aa0
1 changed files with 10 additions and 2 deletions
|
|
@ -719,7 +719,8 @@ Add the following `web.config` file to the root of the site you created as the r
|
||||||
</system.web>
|
</system.web>
|
||||||
<system.webServer>
|
<system.webServer>
|
||||||
<rewrite>
|
<rewrite>
|
||||||
<rules>
|
<!-- useOriginalURLEncoding needs to be set to false, otherwise IIS will double encode urls causing all files with spaces or special characters to be inaccessible -->
|
||||||
|
<rules useOriginalURLEncoding="false">
|
||||||
<!-- Force https -->
|
<!-- Force https -->
|
||||||
<rule name="Https" stopProcessing="true">
|
<rule name="Https" stopProcessing="true">
|
||||||
<match url="(.*)" />
|
<match url="(.*)" />
|
||||||
|
|
@ -734,7 +735,14 @@ Add the following `web.config` file to the root of the site you created as the r
|
||||||
<conditions>
|
<conditions>
|
||||||
<add input="{HTTPS}" pattern="^ON$" />
|
<add input="{HTTPS}" pattern="^ON$" />
|
||||||
</conditions>
|
</conditions>
|
||||||
<action type="Rewrite" url="http://nc-server-farm:11000/{UNENCODED_URL}" appendQueryString="false" />
|
<!-- Note that {UNENCODED_URL} already contains starting slash, so we must add it directly after the port number without additional slash -->
|
||||||
|
<action type="Rewrite" url="http://nc-server-farm:11000{UNENCODED_URL}" appendQueryString="false" />
|
||||||
|
<!-- Setting forwarded headers is not strictly needed but it is a good practice -->
|
||||||
|
<serverVariables>
|
||||||
|
<set name="HTTP_X_FORWARDED_HOST" value="{HTTP_HOST}" />
|
||||||
|
<set name="HTTP_X_FORWARDED_SCHEMA" value="https" />
|
||||||
|
<set name="HTTP_X_FORWARDED_PROTO" value="https" />
|
||||||
|
</serverVariables>
|
||||||
</rule>
|
</rule>
|
||||||
</rules>
|
</rules>
|
||||||
</rewrite>
|
</rewrite>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue