IIS7和ARR作为Subversion的反向代理 [英] IIS7 and ARR as reverse proxy for Subversion

查看:123
本文介绍了IIS7和ARR作为Subversion的反向代理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用IIS7和应用程序请求路由扩展作为Apache上运行的Subversion的反向代理.

I am using IIS7 and the Application Request Routing extension to act as a reverse proxy to Subversion running on Apache.

代理正常工作,我能够浏览服务器,甚至执行签出".但是,我无法浏览到ASP.NET通常禁止的文件,例如.cs,.csproj等.不需要使用ASP.NET文件-例如.txt-.

The proxy works fine and I am able to explore the server, and even perform a "check out". However, I cannot browse to files that would normally be forbidden by ASP.NET - for example, .cs, .csproj, and so on. Files ASP.NET wouldn't be concerned with - such as .txt - are fine.

我试图编辑全局web.config来删除这些文件的禁止处理程序映射,但是似乎没有什么不同.有什么方法可以允许IIS7中的URL重写模块工作,同时允许呈现所有文件扩展名?

I tried to edit the global web.config to remove the Forbidden handler mapping for these files, but it did not seem to make a difference. Is there any way to allow the URL rewriting module in IIS7 to work, while allowing all file extensions to be rendered?

推荐答案

IIS7具有 applicationHost.config 文件,该文件的安全性部分限制了文件扩展名:

IIS7 has an applicationHost.config file which has a security section that limits file extensions:

<requestFiltering>
  <fileExtensions allowUnlisted="true" applyToWebDAV="true">
    <add fileExtension=".cs" allowed="false" />
    <add fileExtension=".csproj" allowed="false" />
    <add fileExtension=".vb" allowed="false" />
    <add fileExtension=".vbproj" allowed="false" />
    ....
  </fileExtensions>

更多信息:

http://learn.iis.net /page.aspx/143/how-to-use-request-filtering/

我在站点的web.config中添加了类似的部分,并使用<clear />节点删除了所有扩展名.现在,我可以提供.cs,.csproj文件和其他文件,但现在还不能提供.config文件.

I added a similar section to my site's web.config and used a <clear /> node to remove all extensions. Now I can serve .cs, .csproj files and others, but I cannot serve .config files yet.

编辑:删除hiddenSection节点也针对web.config文件进行了纠正.这是我的本地web.config文件:

Removing the hiddenSection nodes corrected this for web.config files too. Here is my local web.config file:

<system.webServer>
  <security>
    <requestFiltering>
      <fileExtensions allowUnlisted="true" applyToWebDAV="true">
        <clear />
      </fileExtensions>
      <verbs allowUnlisted="true" applyToWebDAV="true" />
      <hiddenSegments applyToWebDAV="true">
        <clear />
      </hiddenSegments>
    </requestFiltering>
  </security>
</system.webServer>

这篇关于IIS7和ARR作为Subversion的反向代理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆