简体   繁体   English

Apache,SVN和mod_python

[英]Apache, SVN and mod_python

We are using Apache 2.2 to server SVN (1.6.2) repositories on Windows. 我们正在使用Apache 2.2在Windows上服务器SVN(1.6.2)存储库。 We use SSPI for authentication, and that's working. 我们使用SSPI进行身份验证,并且可以正常工作。 We have a number of different repositories, and use SVNParentPath in the httpd.conf to serve them. 我们有许多不同的存储库,并在httpd.conf中使用SVNParentPath为其提供服务。 Something like: 就像是:

<Location />
    DAV svn

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

So from a client I can browse to http://svn/repo1 or http://svn/repo2 (whatever repos are in c:\\repos) and then see what's in the repositories. 因此,从客户端,我可以浏览到http:// svn / repo1http:// svn / repo2 (无论c:\\ repos中有什么存储库),然后查看存储库中的内容。

However I now want to use mod_python to run python scripts in another URL, say http://svn/mpinfo . 但是我现在想使用mod_python在另一个URL中运行python脚本,例如http:// svn / mpinfo

I've tried adding a new location at the end of httpd.conf as follows: 我尝试在httpd.conf的末尾添加新位置,如下所示:

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

as suggested at http://www.modpython.org/live/current/doc-html/inst-trouble.html . http://www.modpython.org/live/current/doc-html/inst-trouble.html所建议。 However when I browse to http://svn/mpinfo I get the following error: 但是,当我浏览到http:// svn / mpinfo时 ,出现以下错误:

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

If I change the location / url of the repositories to, for example, /svn, then I can browse to http://svn/mpinfo . 如果将存储库的位置/ URL更改为例如/ svn,则可以浏览至http:// svn / mpinfo

Question: 题:

Is there anyway to have the repositories accessible from http://svn/reponame , but to have a special directory http://svn/mpinfo/ not parsed by svn, but instead parsed by mod_python. 无论如何,是否可以从http:// svn / reponame访问存储库,但是有一个特殊的目录http:// svn / mpinfo /而不是svn解析,而是由mod_python解析。

First up, do you have any joy if you change the order of the two Location directives? 首先,如果您更改两个Location指令的顺序,您会感到高兴吗? Ie., so that for '/mpinfo' comes before that of '/'. 即,因此,“ / mpinfo”先于“ /”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM