2016-11-29 5 views
2

私はBitnami経由でRedmineをインストールしました。 それは今、私は今、リバースプロキシとしてIISでこれを組み込みたいIIS URLは仮想ディレクトリクッキーで書き換えますか?

http://localhost:81/redmine 

上のApacheサーバー上で実行されます。 だからIISで、私は、アプリケーションhttp://localhost/redmine

を作成して、今私はhttp://localhost:81/redmineからhttp://localhost/redmineにプロキシを逆にします。

私は以下のようにURL書き換えを設定しました。
ログイン以外は動作しているようです。クッキーは書き直されません。 これは、redmineがApacheサーバー上の仮想ディレクトリredmineにあるが、http://localhost:81であり、http://localhost:81/redmineではなくCookieを設定しているためです。

クッキーが書き換えられるようにURL書き換えを変更するにはどうすればよいですか?

</system.web> 
    <system.webServer> 
     <httpRedirect enabled="false" destination="http://localhost:81/redmine/" childOnly="false" /> 
     <rewrite> 
      <rules> 
       <rule name="redmine" patternSyntax="Wildcard" stopProcessing="true"> 
        <match url="*" /> 
        <!-- 
        <conditions> 
        <add input="{HTTP_COOKIE}" pattern="_redmine_session=([0-9.a-zA-Z]+)" /> 
        </conditions> 
       --> 
       <!-- 
       <conditions> 
        <add input="{HTTP_COOKIE}" pattern="_redmine_session=(.*?);" /> 
       </conditions> 
       --> 
        <action type="Rewrite" url="http://localhost:81/redmine/{R:0}" /> 
       </rule> 
      </rules> 
     </rewrite> 
    </system.webServer> 

答えて

2

あなたが欠けているもの: URL書き換えモジュールはURL書き換えモジュールです。
リバースプロキシモジュールではありません。

http://localhost/virt_dir_xからhttp://localhost:3000/virt_dir_yにルールを追加するだけでは不十分です。

また逆方向を書き直す必要があります。 http://localhost:3000/virt_dir_yhttp://localhost/virt_dir_x

this

<system.webServer> 
    <rewrite> 
     <rules> 
      <rule name="ReverseProxyInboundRule1" stopProcessing="true"> 
       <match url="(.*)" /> 
       <action type="Rewrite" url="http://http://127.0.0.1:3000/{R:1}" /> 
      </rule> 
     </rules> 
     <outboundRules> 
      <rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1"> 
       <match filterByTags="A, Form, Img" pattern="^http(s)?://http://127.0.0.1:3000/(.*)" /> 
       <action type="Rewrite" value="http{R:1}://localhost/{R:2}" /> 
      </rule> 
      <preConditions> 
       <preCondition name="ResponseIsHtml1"> 
        <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" /> 
       </preCondition> 
      </preConditions> 
     </outboundRules> 
    </rewrite> 
</system.webServer> 

を参照してくださいこれは、仮想ディレクトリ "Redmineの" の両方のアプリケーションを前提としています。

関連する問題