【问题标题】:Apache, SVN and mod_pythonApache、SVN 和 mod_python
【发布时间】:2009-07-15 17:26:40
【问题描述】:

我们使用 Apache 2.2 在 Windows 上为 SVN (1.6.2) 存储库提供服务器。我们使用 SSPI 进行身份验证,这是有效的。我们有许多不同的存储库,并在 httpd.conf 中使用 SVNParentPath 来为它们提供服务。比如:

<Location />
    DAV svn

    SVNParentPath c:\repos
    [SSPI stuff]
</Location>

因此,我可以从客户端浏览到 http://svn/repo1http://svn/repo2(c:\repos 中的任何存储库),然后查看存储库中的内容。

但是我现在想使用 mod_python 在另一个 URL 中运行 python 脚本,比如http://svn/mpinfo

我尝试在 httpd.conf 的末尾添加一个新位置,如下所示:

<Location /mpinfo>
    SetHandler mod_python
    PythonHandler mod_python.testhandler
</Location>

正如http://www.modpython.org/live/current/doc-html/inst-trouble.html 所建议的那样。但是,当我浏览到 http://svn/mpinfo 时,出现以下错误:

<D:error>
<C:error/>
<m:human-readable errcode="720003">
Could not open the requested SVN filesystem
</m:human-readable>
</D:error>

如果我将存储库的位置/url 更改为例如 /svn,那么我可以浏览到 http://svn/mpinfo

问题:

是否可以从http://svn/reponame 访问存储库,但有一个特殊目录http://svn/mpinfo/ 不被svn 解析,而是由mod_python 解析。

【问题讨论】:

    标签: svn apache mod-python httpd.conf


    【解决方案1】:

    首先,如果你改变两个 Location 指令的顺序,你有什么快乐吗?即,因此 '/mpinfo' 位于 '/' 之前。

    【讨论】:

      猜你喜欢
      • 2010-10-23
      • 1970-01-01
      • 2011-03-11
      • 2012-08-17
      • 2010-09-15
      • 2012-07-05
      • 1970-01-01
      • 2013-05-16
      • 1970-01-01
      相关资源
      最近更新 更多