【发布时间】:2016-01-08 15:43:20
【问题描述】:
在 NGINX 中这种配置的 IIS 等效项是什么?
proxy_set_header X-Forwarded-Proto https;
我在 Windows 服务器上运行 JetBrains YouTrack,使用 IIS 作为终止 SSL 代理,并在尝试登录时收到此错误:
HTTP ERROR 405
Problem accessing /hub/auth/login. Reason:
HTTP method POST is not supported by this URL
Powered by Jetty://
我的 web.config 如下所示:
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Reverse Proxy" patternSyntax="ECMAScript" stopProcessing="true">
<match url="(.*)" />
<!-- Redirect all requests to non-HTTPS site. -->
<action type="Rewrite" url="http://my.youtrack.site/{R:1}" logRewrittenUrl="true" />
</rule>
</rules>
</rewrite>
<handlers>
<clear />
<!-- No other handlers required. Must clear them otherwise ASP.NET might try to intercept *.svc paths etc. -->
<add name="Rewrite" path="*" verb="*" modules="RewriteModule" resourceType="Unspecified" />
</handlers>
</system.webServer>
</configuration>
我正在尝试遵循以下来源的解决方案:https://confluence.jetbrains.com/display/YTD65/Linux.+JAR+in+Nginx+Web+Server,但适用于 IIS
【问题讨论】: